-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docusaurus API Plugin + Libraries (#12)
* Testing a new way to interact with park * Squashed 'api/' content from commit 06e27942d git-subtree-dir: api git-subtree-split: 06e27942d1def5348e4c82cd6b5afd8b4e79422d * Migrating to docusaurus-plugin-typedoc-api * Added libraries, experimental - TODO: Check library entry points. * Squashed 'api/typedoc-plugin/' content from commit b069bc730 git-subtree-dir: api/typedoc-plugin git-subtree-split: b069bc730f29af206c42684c09cdeb6b39d50f00 * Moved packages/plugin/docusaurus-plugin-typedoc-api to docusaurus-typedoc-plugin * Bump @Docusaurus dependencies (3.6.1 -> 3.6.3) * Removed typedoc-codicon-theme, since it cannot be used anymore * Properly linting markdown, ignoring images links * Added plugin building to package * Compiling plugin with typescript, copying assets * Removed plugin footer, useless one * Typedoc 0.26+ uses ReflectionId as identifier (still number, but with exceptions) * Plugins should use @theme-init instead of @theme * Added typedoc 0.26+ document icon * Added Options type export to entry point, using it in docusaurus.config.ts * Downgrading to Typedoc 0.25.13 until jiti-v2 is coming out to Docusaurus - See facebook/docusaurus#10716 for details. * Migrating plugin back too for now * Moving plugin to @nernar/docusaurus-plugin-typedoc, migrating to Docusaurus 3.5.2 * Added libraries tsconfig stuff * Moved declarations to new location * Added libraries packages to API * Some dirty stuff to make it work
- Loading branch information
Showing
180 changed files
with
180,940 additions
and
1,952 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
{ | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"markdown.preferredMdPathExtensionStyle": "removeExtension", | ||
"markdown.validate.enabled": true, | ||
"mdx.experimentalLanguageServer": true, | ||
"markdown.validate.ignoredLinks": [ | ||
"/images/**/*" | ||
], | ||
"search.exclude": { | ||
"**/node_modules": true, | ||
"**/package-lock.json": true, | ||
"**/.wireit": true, | ||
"**/build": true | ||
}, | ||
"[markdown]": { | ||
"editor.defaultFormatter": "DavidAnson.vscode-markdownlint" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Production | ||
docs/ | ||
|
||
# Generated files | ||
/declarations/core-engine.d.ts | ||
/.wireit |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
/** | ||
* Class, upon which armor and attachments render is based | ||
* It is a model that consists of parts, same as in {@link Render}, | ||
* but more abstract, allows creating root parts instead of | ||
* inheritance from old humanoid model. | ||
* @since 2.2.0b75 | ||
*/ | ||
declare class ActorRenderer { | ||
/** | ||
* Constructs new {@link ActorRenderer} object without parts. | ||
*/ | ||
constructor(); | ||
|
||
/** | ||
* Constructs new {@link ActorRenderer} object, | ||
* based on one of default Minecraft render templates. | ||
* @param templateName default template name | ||
*/ | ||
constructor(templateName: DefaultRenderTemplate); | ||
|
||
getUniformSet(): ShaderUniformSet; | ||
|
||
setTexture(textureName: string): void; | ||
|
||
setMaterial(materialName: string): void; | ||
|
||
getPart(name: string): ActorRenderer.ModelPart; | ||
|
||
/** | ||
* Adds a child model part of an existing one. | ||
* @param name child model name | ||
* @param parentName parent model name | ||
*/ | ||
addPart(name: string, parentName: string, mesh?: RenderMesh): ActorRenderer.ModelPart; | ||
|
||
/** | ||
* Adds a root model part. | ||
*/ | ||
addPart(name: string, mesh?: RenderMesh): ActorRenderer.ModelPart; | ||
|
||
} | ||
|
||
declare namespace ActorRenderer { | ||
|
||
/** | ||
* All methods of {@link ActorRenderer.ModelPart} build in such a way, | ||
* that you can create full render in one chain of calls. | ||
* @example | ||
* ```js | ||
* new ActorRenderer() | ||
* .addPart("child", "parent") | ||
* .addBox(-4, -4, -4, 4, 0, 4) | ||
* .addPart("grandChild", "child") | ||
* .addBox(-4, 0, -4, 4, 4, 4) | ||
* .setOffset(0, 4, 0) | ||
* .endPart(); | ||
* ``` | ||
*/ | ||
class ModelPart { | ||
|
||
endPart(): ActorRenderer; | ||
|
||
setTexture(textureName: string): ModelPart; | ||
|
||
setMaterial(materialName: string): ModelPart; | ||
|
||
setTextureSize(w: number, h: number): ModelPart; | ||
|
||
setOffset(x: number, y: number, z: number): ModelPart; | ||
|
||
setRotation(x: number, y: number, z: number): ModelPart; | ||
|
||
setPivot(x: number, y: number, z: number): ModelPart; | ||
|
||
setMirrored(isMirrored: boolean): ModelPart; | ||
|
||
/** | ||
* @param inflate increases the box by a certain value in all directions | ||
*/ | ||
addBox(x: number, y: number, z: number, sizeX: number, sizeY: number, sizeZ: number, inflate: number, u: number, v: number): ModelPart; | ||
|
||
clear(): ModelPart; | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/** | ||
* Module used to manage custom entities added via add-ons. | ||
* @since 2.0.1b18 | ||
* @remarks | ||
* Depends on local player dimension, highly recommended to replace it | ||
* with {@link BlockSource.spawnEntity} and {@link Entity.getTypeName}. | ||
*/ | ||
declare namespace AddonEntityRegistry { | ||
/** | ||
* Spawns an entity defined via add-on on the specified coordinates. | ||
* @param nameID entity name ID, as defined from add-on | ||
* @deprecated Client-side method, use {@link BlockSource.spawnEntity} instead. | ||
*/ | ||
function spawn(x: number, y: number, z: number, nameID: string): number; | ||
|
||
/** | ||
* Added entities stores in registry, so already spawned entity | ||
* data may resolved again by requesting information by UID. | ||
* @returns Add-on entity information by entity ID. | ||
*/ | ||
function getEntityData(entity: number): AddonEntity; | ||
|
||
interface AddonEntity { | ||
/** | ||
* Entity unique ID. | ||
*/ | ||
readonly id: number, | ||
|
||
/** | ||
* Add-on defined entity name ID. | ||
*/ | ||
readonly type: string, | ||
|
||
/** | ||
* Executes command with the entity. | ||
* @param command command to be executed | ||
* @returns Error message or null if the command was run successfully. | ||
*/ | ||
exec(command: string): Nullable<string>; | ||
|
||
/** | ||
* Executes command with the entity on the specified coordinates. | ||
* @param command command to be executed | ||
* @returns Error message or null if the command was run successfully. | ||
*/ | ||
execAt(command: string, x: number, y: number, z: number): Nullable<string>; | ||
} | ||
} |
Oops, something went wrong.