@vista3d/mcp 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +12 -0
- package/README.md +73 -2
- package/README.zh-CN.md +74 -0
- package/data/.gitkeep +0 -0
- package/data/api-index.json +16116 -0
- package/data/search-index.json +71479 -0
- package/data/typedoc-md/core/README.md +359 -0
- package/data/typedoc-md/core/classes/AmbientLight.md +755 -0
- package/data/typedoc-md/core/classes/Animation.md +681 -0
- package/data/typedoc-md/core/classes/AnimationController.md +195 -0
- package/data/typedoc-md/core/classes/AnimationCurve.md +287 -0
- package/data/typedoc-md/core/classes/AnimationCurveKeyframe.md +148 -0
- package/data/typedoc-md/core/classes/Annotation.md +1466 -0
- package/data/typedoc-md/core/classes/AutoExposureNode.md +269 -0
- package/data/typedoc-md/core/classes/Background.md +77 -0
- package/data/typedoc-md/core/classes/BoolUpdateFlag.md +145 -0
- package/data/typedoc-md/core/classes/Camera.md +1264 -0
- package/data/typedoc-md/core/classes/ClipAnimationController.md +1192 -0
- package/data/typedoc-md/core/classes/ClipPlaneUpdater.md +1075 -0
- package/data/typedoc-md/core/classes/Color4.md +499 -0
- package/data/typedoc-md/core/classes/ColorGradingNode.md +157 -0
- package/data/typedoc-md/core/classes/Command.md +69 -0
- package/data/typedoc-md/core/classes/CommandGroup.md +122 -0
- package/data/typedoc-md/core/classes/CommandHistory.md +445 -0
- package/data/typedoc-md/core/classes/Component.md +592 -0
- package/data/typedoc-md/core/classes/ComponentsDependencies.md +174 -0
- package/data/typedoc-md/core/classes/ComponentsManager.md +820 -0
- package/data/typedoc-md/core/classes/Controls.md +1308 -0
- package/data/typedoc-md/core/classes/DirectionalLight.md +1073 -0
- package/data/typedoc-md/core/classes/DisorderedArray.md +394 -0
- package/data/typedoc-md/core/classes/DitherNode.md +141 -0
- package/data/typedoc-md/core/classes/Engine.md +997 -0
- package/data/typedoc-md/core/classes/EngineObject.md +264 -0
- package/data/typedoc-md/core/classes/Entity.md +1014 -0
- package/data/typedoc-md/core/classes/Environment.md +159 -0
- package/data/typedoc-md/core/classes/EventDispatcher.md +215 -0
- package/data/typedoc-md/core/classes/GLTFParser.md +278 -0
- package/data/typedoc-md/core/classes/GLTFResource.md +465 -0
- package/data/typedoc-md/core/classes/GeometryResource.md +355 -0
- package/data/typedoc-md/core/classes/GlyphAtlas.md +180 -0
- package/data/typedoc-md/core/classes/Gradient.md +702 -0
- package/data/typedoc-md/core/classes/GradientAlphaKey.md +70 -0
- package/data/typedoc-md/core/classes/GradientColorKey.md +74 -0
- package/data/typedoc-md/core/classes/GrainNode.md +155 -0
- package/data/typedoc-md/core/classes/HemisphereLight.md +795 -0
- package/data/typedoc-md/core/classes/InstancedModelRenderer.md +2720 -0
- package/data/typedoc-md/core/classes/KarisBloomNode.md +171 -0
- package/data/typedoc-md/core/classes/LUTResource.md +356 -0
- package/data/typedoc-md/core/classes/Label.md +3086 -0
- package/data/typedoc-md/core/classes/LensFlareNode.md +257 -0
- package/data/typedoc-md/core/classes/LightProbe.md +179 -0
- package/data/typedoc-md/core/classes/LightProbeGroup.md +271 -0
- package/data/typedoc-md/core/classes/LinearPicker.md +263 -0
- package/data/typedoc-md/core/classes/Logger.md +151 -0
- package/data/typedoc-md/core/classes/MaterialResource.md +397 -0
- package/data/typedoc-md/core/classes/MemoryEstimator.md +290 -0
- package/data/typedoc-md/core/classes/MeshRenderer.md +2581 -0
- package/data/typedoc-md/core/classes/MinMaxCurve.md +392 -0
- package/data/typedoc-md/core/classes/MinMaxGradient.md +385 -0
- package/data/typedoc-md/core/classes/ModelRenderer.md +2715 -0
- package/data/typedoc-md/core/classes/Module.md +269 -0
- package/data/typedoc-md/core/classes/OrbitControls.md +2015 -0
- package/data/typedoc-md/core/classes/OrthographicCamera.md +1505 -0
- package/data/typedoc-md/core/classes/ParallelLight.md +941 -0
- package/data/typedoc-md/core/classes/PerspectiveCamera.md +1525 -0
- package/data/typedoc-md/core/classes/Picker.md +209 -0
- package/data/typedoc-md/core/classes/PointLight.md +1108 -0
- package/data/typedoc-md/core/classes/Queue.md +159 -0
- package/data/typedoc-md/core/classes/Random.md +140 -0
- package/data/typedoc-md/core/classes/RectAreaLight.md +1048 -0
- package/data/typedoc-md/core/classes/RectangleCulling.md +310 -0
- package/data/typedoc-md/core/classes/RenderDebugInfo.md +144 -0
- package/data/typedoc-md/core/classes/Renderer.md +2324 -0
- package/data/typedoc-md/core/classes/Resource.md +313 -0
- package/data/typedoc-md/core/classes/ResourceManager.md +1214 -0
- package/data/typedoc-md/core/classes/ResourceRef.md +124 -0
- package/data/typedoc-md/core/classes/SDFGlyphGenerator.md +183 -0
- package/data/typedoc-md/core/classes/SSFNode.md +377 -0
- package/data/typedoc-md/core/classes/Scene.md +1089 -0
- package/data/typedoc-md/core/classes/SceneCoordinateSystem.md +442 -0
- package/data/typedoc-md/core/classes/SceneRenderer.md +409 -0
- package/data/typedoc-md/core/classes/Script.md +934 -0
- package/data/typedoc-md/core/classes/ScriptableSceneRenderer.md +540 -0
- package/data/typedoc-md/core/classes/ShaderChunk.md +93 -0
- package/data/typedoc-md/core/classes/SkyBackground.md +157 -0
- package/data/typedoc-md/core/classes/SolidColorBackground.md +117 -0
- package/data/typedoc-md/core/classes/SpotLight.md +1324 -0
- package/data/typedoc-md/core/classes/TaskController.md +249 -0
- package/data/typedoc-md/core/classes/TextureAtlas.md +173 -0
- package/data/typedoc-md/core/classes/TextureBackground.md +174 -0
- package/data/typedoc-md/core/classes/TextureResource.md +358 -0
- package/data/typedoc-md/core/classes/TiltedViewClipPlaneEstimator.md +591 -0
- package/data/typedoc-md/core/classes/TopDownClipPlaneEstimator.md +512 -0
- package/data/typedoc-md/core/classes/Transform.md +1893 -0
- package/data/typedoc-md/core/classes/UniformsLib.md +189 -0
- package/data/typedoc-md/core/classes/UpdateFlag.md +111 -0
- package/data/typedoc-md/core/classes/UpdateFlagManager.md +223 -0
- package/data/typedoc-md/core/classes/ValueNoise.md +164 -0
- package/data/typedoc-md/core/classes/WebGLEngine.md +1166 -0
- package/data/typedoc-md/core/classes/WebGPUEngine.md +1154 -0
- package/data/typedoc-md/core/classes/WorkerCrashedError.md +93 -0
- package/data/typedoc-md/core/classes/WorkerDefinitionNotFoundError.md +49 -0
- package/data/typedoc-md/core/classes/WorkerManager.md +266 -0
- package/data/typedoc-md/core/classes/WorkerPool.md +93 -0
- package/data/typedoc-md/core/classes/WorkerPoolDisposedError.md +49 -0
- package/data/typedoc-md/core/classes/WorkerRegistry.md +162 -0
- package/data/typedoc-md/core/classes/WorkerTaskAbortedError.md +55 -0
- package/data/typedoc-md/core/classes/WorkerTaskExecutionError.md +114 -0
- package/data/typedoc-md/core/classes/WorkerTaskTimeoutError.md +61 -0
- package/data/typedoc-md/core/enumerations/BackgroundType.md +45 -0
- package/data/typedoc-md/core/enumerations/CommandHistoryEventType.md +63 -0
- package/data/typedoc-md/core/enumerations/DependentMode.md +29 -0
- package/data/typedoc-md/core/enumerations/EasingName.md +632 -0
- package/data/typedoc-md/core/enumerations/EventType.md +153 -0
- package/data/typedoc-md/core/enumerations/GradientMode.md +48 -0
- package/data/typedoc-md/core/enumerations/HorizontalOrigin.md +39 -0
- package/data/typedoc-md/core/enumerations/InterpolationMode.md +67 -0
- package/data/typedoc-md/core/enumerations/LogLevel.md +63 -0
- package/data/typedoc-md/core/enumerations/MinMaxCurveMode.md +67 -0
- package/data/typedoc-md/core/enumerations/MinMaxGradientMode.md +101 -0
- package/data/typedoc-md/core/enumerations/Priority.md +45 -0
- package/data/typedoc-md/core/enumerations/QueryMask.md +360 -0
- package/data/typedoc-md/core/enumerations/RenderOrder.md +43 -0
- package/data/typedoc-md/core/enumerations/TextAlign.md +45 -0
- package/data/typedoc-md/core/enumerations/VerticalOrigin.md +39 -0
- package/data/typedoc-md/core/enumerations/WeightedMode.md +81 -0
- package/data/typedoc-md/core/enumerations/WrapMode.md +100 -0
- package/data/typedoc-md/core/functions/assert.md +37 -0
- package/data/typedoc-md/core/functions/autoExposure.md +40 -0
- package/data/typedoc-md/core/functions/backIn.md +33 -0
- package/data/typedoc-md/core/functions/backInOut.md +34 -0
- package/data/typedoc-md/core/functions/backOut.md +33 -0
- package/data/typedoc-md/core/functions/bounceIn.md +33 -0
- package/data/typedoc-md/core/functions/bounceInOut.md +33 -0
- package/data/typedoc-md/core/functions/bounceOut.md +32 -0
- package/data/typedoc-md/core/functions/circIn.md +33 -0
- package/data/typedoc-md/core/functions/circInOut.md +34 -0
- package/data/typedoc-md/core/functions/circOut.md +33 -0
- package/data/typedoc-md/core/functions/collectMaterialTextureBindings.md +40 -0
- package/data/typedoc-md/core/functions/collectTransferables.md +37 -0
- package/data/typedoc-md/core/functions/colorGrading.md +31 -0
- package/data/typedoc-md/core/functions/constant.md +24 -0
- package/data/typedoc-md/core/functions/createErrorEnvelope.md +41 -0
- package/data/typedoc-md/core/functions/createEventEnvelope.md +50 -0
- package/data/typedoc-md/core/functions/createRequestEnvelope.md +47 -0
- package/data/typedoc-md/core/functions/createResultEnvelope.md +47 -0
- package/data/typedoc-md/core/functions/createTextureLoader.md +29 -0
- package/data/typedoc-md/core/functions/createWorkerEndpoint.md +54 -0
- package/data/typedoc-md/core/functions/createWorkerTransferResult.md +41 -0
- package/data/typedoc-md/core/functions/cubicIn.md +32 -0
- package/data/typedoc-md/core/functions/cubicInOut.md +32 -0
- package/data/typedoc-md/core/functions/cubicOut.md +32 -0
- package/data/typedoc-md/core/functions/curlNoise2D.md +38 -0
- package/data/typedoc-md/core/functions/curlNoise3D.md +39 -0
- package/data/typedoc-md/core/functions/defaultValue.md +35 -0
- package/data/typedoc-md/core/functions/defined.md +35 -0
- package/data/typedoc-md/core/functions/dependentComponents.md +79 -0
- package/data/typedoc-md/core/functions/deserializeError.md +41 -0
- package/data/typedoc-md/core/functions/dither.md +34 -0
- package/data/typedoc-md/core/functions/elasticIn.md +34 -0
- package/data/typedoc-md/core/functions/elasticInOut.md +34 -0
- package/data/typedoc-md/core/functions/elasticOut.md +34 -0
- package/data/typedoc-md/core/functions/expoIn.md +32 -0
- package/data/typedoc-md/core/functions/expoInOut.md +33 -0
- package/data/typedoc-md/core/functions/expoOut.md +32 -0
- package/data/typedoc-md/core/functions/fade.md +33 -0
- package/data/typedoc-md/core/functions/fbm.md +39 -0
- package/data/typedoc-md/core/functions/getEasingFunction.md +39 -0
- package/data/typedoc-md/core/functions/grain.md +34 -0
- package/data/typedoc-md/core/functions/isWorkerMessageEnvelope.md +29 -0
- package/data/typedoc-md/core/functions/isWorkerTransferResult.md +35 -0
- package/data/typedoc-md/core/functions/karisBloom.md +33 -0
- package/data/typedoc-md/core/functions/lensFlare.md +52 -0
- package/data/typedoc-md/core/functions/linear.md +32 -0
- package/data/typedoc-md/core/functions/normalizePositiveNumber.md +33 -0
- package/data/typedoc-md/core/functions/packUnorm16.md +32 -0
- package/data/typedoc-md/core/functions/packUnorm8.md +32 -0
- package/data/typedoc-md/core/functions/pingPong.md +38 -0
- package/data/typedoc-md/core/functions/pixelHash.md +50 -0
- package/data/typedoc-md/core/functions/propertyChanged.md +29 -0
- package/data/typedoc-md/core/functions/pseudoRandom.md +29 -0
- package/data/typedoc-md/core/functions/pseudoRandomRange.md +41 -0
- package/data/typedoc-md/core/functions/pseudoRandomRangeInt.md +41 -0
- package/data/typedoc-md/core/functions/quadIn.md +32 -0
- package/data/typedoc-md/core/functions/quadInOut.md +32 -0
- package/data/typedoc-md/core/functions/quadOut.md +32 -0
- package/data/typedoc-md/core/functions/quartIn.md +32 -0
- package/data/typedoc-md/core/functions/quartInOut.md +32 -0
- package/data/typedoc-md/core/functions/quartOut.md +32 -0
- package/data/typedoc-md/core/functions/quickSort.md +51 -0
- package/data/typedoc-md/core/functions/quintIn.md +32 -0
- package/data/typedoc-md/core/functions/quintInOut.md +32 -0
- package/data/typedoc-md/core/functions/quintOut.md +32 -0
- package/data/typedoc-md/core/functions/random.md +21 -0
- package/data/typedoc-md/core/functions/randomRange.md +35 -0
- package/data/typedoc-md/core/functions/randomRangeInt.md +35 -0
- package/data/typedoc-md/core/functions/removeFromArray.md +35 -0
- package/data/typedoc-md/core/functions/repeat.md +38 -0
- package/data/typedoc-md/core/functions/ridgedNoise.md +38 -0
- package/data/typedoc-md/core/functions/serializeError.md +31 -0
- package/data/typedoc-md/core/functions/setRandomFunc.md +35 -0
- package/data/typedoc-md/core/functions/sineIn.md +32 -0
- package/data/typedoc-md/core/functions/sineInOut.md +32 -0
- package/data/typedoc-md/core/functions/sineOut.md +32 -0
- package/data/typedoc-md/core/functions/smooth.md +33 -0
- package/data/typedoc-md/core/functions/ssf.md +39 -0
- package/data/typedoc-md/core/interfaces/AmbientLightParams.md +79 -0
- package/data/typedoc-md/core/interfaces/AnimationParams.md +67 -0
- package/data/typedoc-md/core/interfaces/AnnotationParams.md +242 -0
- package/data/typedoc-md/core/interfaces/BackgroundParams.md +53 -0
- package/data/typedoc-md/core/interfaces/CameraParams.md +238 -0
- package/data/typedoc-md/core/interfaces/ClipPlaneRange.md +86 -0
- package/data/typedoc-md/core/interfaces/ClipPlaneUpdaterParams.md +95 -0
- package/data/typedoc-md/core/interfaces/CloudSample.md +94 -0
- package/data/typedoc-md/core/interfaces/CommandHistoryEvent.md +43 -0
- package/data/typedoc-md/core/interfaces/CommandHistoryParams.md +29 -0
- package/data/typedoc-md/core/interfaces/ComponentParams.md +60 -0
- package/data/typedoc-md/core/interfaces/ComputeInfo.md +43 -0
- package/data/typedoc-md/core/interfaces/ControlsParams.md +80 -0
- package/data/typedoc-md/core/interfaces/CreateTaskOptions.md +105 -0
- package/data/typedoc-md/core/interfaces/DebugInfo.md +71 -0
- package/data/typedoc-md/core/interfaces/DirectionalLightParams.md +135 -0
- package/data/typedoc-md/core/interfaces/EngineParams.md +71 -0
- package/data/typedoc-md/core/interfaces/EntityParams.md +75 -0
- package/data/typedoc-md/core/interfaces/EnvironmentParams.md +81 -0
- package/data/typedoc-md/core/interfaces/FogParams.md +118 -0
- package/data/typedoc-md/core/interfaces/FramebufferCaptureParams.md +73 -0
- package/data/typedoc-md/core/interfaces/GLTFParserParams.md +188 -0
- package/data/typedoc-md/core/interfaces/GlyphAtlasBlock.md +87 -0
- package/data/typedoc-md/core/interfaces/GlyphAtlasParams.md +89 -0
- package/data/typedoc-md/core/interfaces/HemisphereLightParams.md +93 -0
- package/data/typedoc-md/core/interfaces/IClipPlaneEstimator.md +93 -0
- package/data/typedoc-md/core/interfaces/InstancedGLTFParserParams.md +177 -0
- package/data/typedoc-md/core/interfaces/InstancedModelRendererParams.md +203 -0
- package/data/typedoc-md/core/interfaces/LabelImageParams.md +119 -0
- package/data/typedoc-md/core/interfaces/LabelParams.md +374 -0
- package/data/typedoc-md/core/interfaces/LabelTextOutlineParams.md +49 -0
- package/data/typedoc-md/core/interfaces/LabelTextParams.md +153 -0
- package/data/typedoc-md/core/interfaces/LightProbeGroupParams.md +200 -0
- package/data/typedoc-md/core/interfaces/LightProbeParams.md +72 -0
- package/data/typedoc-md/core/interfaces/LightShadowParams.md +137 -0
- package/data/typedoc-md/core/interfaces/MaterialTextureBinding.md +86 -0
- package/data/typedoc-md/core/interfaces/MemoryEstimateOptions.md +46 -0
- package/data/typedoc-md/core/interfaces/MemoryInfo.md +155 -0
- package/data/typedoc-md/core/interfaces/MemoryUsage.md +94 -0
- package/data/typedoc-md/core/interfaces/MemoryUsageBreakdown.md +59 -0
- package/data/typedoc-md/core/interfaces/MeshRendererParams.md +157 -0
- package/data/typedoc-md/core/interfaces/ModelRendererParams.md +188 -0
- package/data/typedoc-md/core/interfaces/ModuleParams.md +21 -0
- package/data/typedoc-md/core/interfaces/OrbitControlsParams.md +549 -0
- package/data/typedoc-md/core/interfaces/OrthographicCameraParams.md +299 -0
- package/data/typedoc-md/core/interfaces/ParallelLightParams.md +122 -0
- package/data/typedoc-md/core/interfaces/PendingWorkerTask.md +49 -0
- package/data/typedoc-md/core/interfaces/PerspectiveCameraParams.md +299 -0
- package/data/typedoc-md/core/interfaces/PickResult.md +53 -0
- package/data/typedoc-md/core/interfaces/PickerParams.md +27 -0
- package/data/typedoc-md/core/interfaces/PointLightParams.md +177 -0
- package/data/typedoc-md/core/interfaces/RectAreaLightParams.md +177 -0
- package/data/typedoc-md/core/interfaces/RectangleCullingItem.md +123 -0
- package/data/typedoc-md/core/interfaces/RectangleCullingParticipant.md +59 -0
- package/data/typedoc-md/core/interfaces/RectangleCullingRect.md +92 -0
- package/data/typedoc-md/core/interfaces/RenderInfo.md +99 -0
- package/data/typedoc-md/core/interfaces/RenderParams.md +117 -0
- package/data/typedoc-md/core/interfaces/RendererParams.md +120 -0
- package/data/typedoc-md/core/interfaces/ResourceManagerMemoryStats.md +141 -0
- package/data/typedoc-md/core/interfaces/ResourceManagerParams.md +85 -0
- package/data/typedoc-md/core/interfaces/SDFFont.md +85 -0
- package/data/typedoc-md/core/interfaces/SDFGlyph.md +130 -0
- package/data/typedoc-md/core/interfaces/SDFGlyphGeneratorParams.md +55 -0
- package/data/typedoc-md/core/interfaces/SRSDescriptor.md +50 -0
- package/data/typedoc-md/core/interfaces/SceneParams.md +145 -0
- package/data/typedoc-md/core/interfaces/ScriptableSceneRendererParams.md +105 -0
- package/data/typedoc-md/core/interfaces/SerializedWorkerError.md +74 -0
- package/data/typedoc-md/core/interfaces/SpotLightParams.md +219 -0
- package/data/typedoc-md/core/interfaces/TextureAtlasBlock.md +59 -0
- package/data/typedoc-md/core/interfaces/TextureAtlasParams.md +75 -0
- package/data/typedoc-md/core/interfaces/TextureBackgroundParams.md +81 -0
- package/data/typedoc-md/core/interfaces/TiltedViewClipPlaneEstimatorParams.md +231 -0
- package/data/typedoc-md/core/interfaces/TopDownClipPlaneEstimatorParams.md +180 -0
- package/data/typedoc-md/core/interfaces/TransformParams.md +135 -0
- package/data/typedoc-md/core/interfaces/Transformation.md +85 -0
- package/data/typedoc-md/core/interfaces/WebGLParams.md +161 -0
- package/data/typedoc-md/core/interfaces/WebGPUParams.md +181 -0
- package/data/typedoc-md/core/interfaces/WorkerDefinition.md +134 -0
- package/data/typedoc-md/core/interfaces/WorkerEndpointContext.md +88 -0
- package/data/typedoc-md/core/interfaces/WorkerLease.md +71 -0
- package/data/typedoc-md/core/interfaces/WorkerManagerLike.md +167 -0
- package/data/typedoc-md/core/interfaces/WorkerManagerOptions.md +73 -0
- package/data/typedoc-md/core/interfaces/WorkerMessageEnvelope.md +109 -0
- package/data/typedoc-md/core/interfaces/WorkerRunOptions.md +43 -0
- package/data/typedoc-md/core/interfaces/WorkerTaskRequest.md +80 -0
- package/data/typedoc-md/core/interfaces/WorkerTransferResult.md +69 -0
- package/data/typedoc-md/core/type-aliases/ComponentConstructor.md +37 -0
- package/data/typedoc-md/core/type-aliases/ComponentCtor.md +43 -0
- package/data/typedoc-md/core/type-aliases/IsOptional.md +25 -0
- package/data/typedoc-md/core/type-aliases/MaterialTextureBindingKind.md +15 -0
- package/data/typedoc-md/core/type-aliases/ModuleConstructor.md +40 -0
- package/data/typedoc-md/core/type-aliases/ModuleCtor.md +46 -0
- package/data/typedoc-md/core/type-aliases/PickerConstructor.md +37 -0
- package/data/typedoc-md/core/type-aliases/PickerCtor.md +45 -0
- package/data/typedoc-md/core/type-aliases/ScriptableRenderCallback.md +31 -0
- package/data/typedoc-md/core/type-aliases/SkyBackgroundParams.md +15 -0
- package/data/typedoc-md/core/type-aliases/SubscriberCallbackFn.md +28 -0
- package/data/typedoc-md/core/type-aliases/WorkerEndpointHandler.md +43 -0
- package/data/typedoc-md/core/type-aliases/WorkerFactory.md +23 -0
- package/data/typedoc-md/core/type-aliases/WorkerMessageKind.md +17 -0
- package/data/typedoc-md/core/type-aliases/WorkerStrategy.md +22 -0
- package/data/typedoc-md/core/variables/CORE_VERSION.md +11 -0
- package/data/typedoc-md/core/variables/DEV.md +13 -0
- package/data/typedoc-md/core/variables/EARTH_MAX_BUILDING_HEIGHT.md +17 -0
- package/data/typedoc-md/core/variables/EARTH_PERIMETER.md +19 -0
- package/data/typedoc-md/core/variables/EARTH_RADIUS.md +17 -0
- package/data/typedoc-md/core/variables/EPSILON.md +21 -0
- package/data/typedoc-md/core/variables/WORKER_TRANSFER_RESULT.md +18 -0
- package/data/typedoc-md/core/variables/backOutIn.md +34 -0
- package/data/typedoc-md/core/variables/bounceOutIn.md +34 -0
- package/data/typedoc-md/core/variables/circOutIn.md +34 -0
- package/data/typedoc-md/core/variables/cubicOutIn.md +34 -0
- package/data/typedoc-md/core/variables/elasticOutIn.md +34 -0
- package/data/typedoc-md/core/variables/expoOutIn.md +34 -0
- package/data/typedoc-md/core/variables/fbmValueNoise.md +27 -0
- package/data/typedoc-md/core/variables/hash2d.md +28 -0
- package/data/typedoc-md/core/variables/perlinNoise2D.md +28 -0
- package/data/typedoc-md/core/variables/perlinNoise3D.md +28 -0
- package/data/typedoc-md/core/variables/permute.md +27 -0
- package/data/typedoc-md/core/variables/quadOutIn.md +34 -0
- package/data/typedoc-md/core/variables/quartOutIn.md +34 -0
- package/data/typedoc-md/core/variables/quintOutIn.md +34 -0
- package/data/typedoc-md/core/variables/random01.md +25 -0
- package/data/typedoc-md/core/variables/randomGradient.md +25 -0
- package/data/typedoc-md/core/variables/randomGradient3D.md +27 -0
- package/data/typedoc-md/core/variables/randomRangeFn.md +37 -0
- package/data/typedoc-md/core/variables/randomVec2.md +25 -0
- package/data/typedoc-md/core/variables/randomVec3.md +25 -0
- package/data/typedoc-md/core/variables/simplexNoise2D.md +27 -0
- package/data/typedoc-md/core/variables/simplexNoise3D.md +27 -0
- package/data/typedoc-md/core/variables/sineOutIn.md +34 -0
- package/data/typedoc-md/core/variables/valueNoise2D.md +27 -0
- package/data/typedoc-md/core/variables/valueNoise3D.md +28 -0
- package/data/typedoc-md/core/variables/whiteNoise2D.md +27 -0
- package/data/typedoc-md/core/variables/whiteNoise3D.md +27 -0
- package/data/typedoc-md/core/variables/worleyNoise2D.md +27 -0
- package/data/typedoc-md/core/variables/worleyNoise3D.md +28 -0
- package/data/typedoc-md/particlesystem/README.md +271 -0
- package/data/typedoc-md/particlesystem/classes/BillboardParticleRenderer.md +1242 -0
- package/data/typedoc-md/particlesystem/classes/BuoyancyBlock.md +527 -0
- package/data/typedoc-md/particlesystem/classes/CollisionBoxBlock.md +824 -0
- package/data/typedoc-md/particlesystem/classes/CollisionCylinderBlock.md +908 -0
- package/data/typedoc-md/particlesystem/classes/CollisionModule.md +661 -0
- package/data/typedoc-md/particlesystem/classes/CollisionPlaneBlock.md +825 -0
- package/data/typedoc-md/particlesystem/classes/CollisionSphereBlock.md +825 -0
- package/data/typedoc-md/particlesystem/classes/ColorBySpeedModule.md +303 -0
- package/data/typedoc-md/particlesystem/classes/ColorOverLifetimeModule.md +288 -0
- package/data/typedoc-md/particlesystem/classes/ConformSphereBlock.md +652 -0
- package/data/typedoc-md/particlesystem/classes/EmissionModule.md +393 -0
- package/data/typedoc-md/particlesystem/classes/EmitContext.md +725 -0
- package/data/typedoc-md/particlesystem/classes/EventSpawnContext.md +367 -0
- package/data/typedoc-md/particlesystem/classes/FlipbookPlayerBlock.md +924 -0
- package/data/typedoc-md/particlesystem/classes/ForceBlock.md +568 -0
- package/data/typedoc-md/particlesystem/classes/ForceOverLifetimeModule.md +457 -0
- package/data/typedoc-md/particlesystem/classes/GravityBlock.md +414 -0
- package/data/typedoc-md/particlesystem/classes/InheritVelocityModule.md +348 -0
- package/data/typedoc-md/particlesystem/classes/KillByAgeBlock.md +402 -0
- package/data/typedoc-md/particlesystem/classes/KillByBoxBlock.md +526 -0
- package/data/typedoc-md/particlesystem/classes/KillByCylinderBlock.md +610 -0
- package/data/typedoc-md/particlesystem/classes/KillByPlaneBlock.md +526 -0
- package/data/typedoc-md/particlesystem/classes/KillBySphereBlock.md +525 -0
- package/data/typedoc-md/particlesystem/classes/LifetimeByEmitterSpeedModule.md +358 -0
- package/data/typedoc-md/particlesystem/classes/LightsModule.md +570 -0
- package/data/typedoc-md/particlesystem/classes/LimitVelocityOverLifetimeModule.md +657 -0
- package/data/typedoc-md/particlesystem/classes/LinearDragBlock.md +486 -0
- package/data/typedoc-md/particlesystem/classes/MainModule.md +1216 -0
- package/data/typedoc-md/particlesystem/classes/MeshOutputContext.md +691 -0
- package/data/typedoc-md/particlesystem/classes/MeshParticleRenderer.md +552 -0
- package/data/typedoc-md/particlesystem/classes/MultiplyAngle3DOverLifeBlock.md +441 -0
- package/data/typedoc-md/particlesystem/classes/MultiplyAngleOverLifeBlock.md +413 -0
- package/data/typedoc-md/particlesystem/classes/MultiplyAngularVelocity3DOverLifeBlock.md +441 -0
- package/data/typedoc-md/particlesystem/classes/MultiplyAngularVelocityOverLifeBlock.md +413 -0
- package/data/typedoc-md/particlesystem/classes/MultiplyColorOverLifeBlock.md +456 -0
- package/data/typedoc-md/particlesystem/classes/MultiplyScaleOverLifeBlock.md +441 -0
- package/data/typedoc-md/particlesystem/classes/MultiplySizeOverLifeBlock.md +413 -0
- package/data/typedoc-md/particlesystem/classes/NoiseModule.md +766 -0
- package/data/typedoc-md/particlesystem/classes/NoneParticleRenderer.md +501 -0
- package/data/typedoc-md/particlesystem/classes/OrientAlongVelocityBlock.md +401 -0
- package/data/typedoc-md/particlesystem/classes/OrientFaceCameraPlaneBlock.md +401 -0
- package/data/typedoc-md/particlesystem/classes/OrientFaceCameraPositionBlock.md +402 -0
- package/data/typedoc-md/particlesystem/classes/OrientFixedAxisBlock.md +442 -0
- package/data/typedoc-md/particlesystem/classes/OrientLookAtPositionBlock.md +441 -0
- package/data/typedoc-md/particlesystem/classes/OutputContext.md +489 -0
- package/data/typedoc-md/particlesystem/classes/ParticleModule.md +256 -0
- package/data/typedoc-md/particlesystem/classes/ParticleModuleRegistry.md +95 -0
- package/data/typedoc-md/particlesystem/classes/ParticleRenderer.md +415 -0
- package/data/typedoc-md/particlesystem/classes/ParticleRendererRegistry.md +103 -0
- package/data/typedoc-md/particlesystem/classes/ParticleSystem.md +1056 -0
- package/data/typedoc-md/particlesystem/classes/ParticleSystemFactory.md +98 -0
- package/data/typedoc-md/particlesystem/classes/PointAttractRepelBlock.md +568 -0
- package/data/typedoc-md/particlesystem/classes/QuadOutputContext.md +1524 -0
- package/data/typedoc-md/particlesystem/classes/RotationBySpeedModule.md +516 -0
- package/data/typedoc-md/particlesystem/classes/RotationOverLifetimeModule.md +460 -0
- package/data/typedoc-md/particlesystem/classes/SetAngle3DBlock.md +434 -0
- package/data/typedoc-md/particlesystem/classes/SetAngle3DOverLifeBlock.md +440 -0
- package/data/typedoc-md/particlesystem/classes/SetAngleBlock.md +449 -0
- package/data/typedoc-md/particlesystem/classes/SetAngleOverLifeBlock.md +412 -0
- package/data/typedoc-md/particlesystem/classes/SetAngularVelocity3DBlock.md +439 -0
- package/data/typedoc-md/particlesystem/classes/SetAngularVelocity3DOverLifeBlock.md +441 -0
- package/data/typedoc-md/particlesystem/classes/SetAngularVelocityBlock.md +407 -0
- package/data/typedoc-md/particlesystem/classes/SetAngularVelocityOverLifeBlock.md +413 -0
- package/data/typedoc-md/particlesystem/classes/SetColorBlock.md +404 -0
- package/data/typedoc-md/particlesystem/classes/SetColorBySpeedBlock.md +497 -0
- package/data/typedoc-md/particlesystem/classes/SetColorOverLifeBlock.md +454 -0
- package/data/typedoc-md/particlesystem/classes/SetLifetimeBlock.md +407 -0
- package/data/typedoc-md/particlesystem/classes/SetMassBlock.md +408 -0
- package/data/typedoc-md/particlesystem/classes/SetPositionBlock.md +435 -0
- package/data/typedoc-md/particlesystem/classes/SetSize3DBlock.md +434 -0
- package/data/typedoc-md/particlesystem/classes/SetSizeBlock.md +407 -0
- package/data/typedoc-md/particlesystem/classes/SetSizeBySpeedBlock.md +454 -0
- package/data/typedoc-md/particlesystem/classes/SetSizeOverLifeBlock.md +412 -0
- package/data/typedoc-md/particlesystem/classes/SetVelocityBlock.md +626 -0
- package/data/typedoc-md/particlesystem/classes/SetVelocityTangentBlock.md +628 -0
- package/data/typedoc-md/particlesystem/classes/ShapeModule.md +663 -0
- package/data/typedoc-md/particlesystem/classes/SizeBySpeedModule.md +556 -0
- package/data/typedoc-md/particlesystem/classes/SizeOverLifetimeModule.md +542 -0
- package/data/typedoc-md/particlesystem/classes/SoftBoundaryForceBlock.md +652 -0
- package/data/typedoc-md/particlesystem/classes/SpawnContext.md +355 -0
- package/data/typedoc-md/particlesystem/classes/StripQuadOutputContext.md +1309 -0
- package/data/typedoc-md/particlesystem/classes/SubEmitterBirthInstance.md +104 -0
- package/data/typedoc-md/particlesystem/classes/SubEmittersModule.md +661 -0
- package/data/typedoc-md/particlesystem/classes/TextureSheetAnimationModule.md +641 -0
- package/data/typedoc-md/particlesystem/classes/TrailsModule.md +842 -0
- package/data/typedoc-md/particlesystem/classes/TriggerEventOnCollideBlock.md +448 -0
- package/data/typedoc-md/particlesystem/classes/TriggerEventOnDieBlock.md +447 -0
- package/data/typedoc-md/particlesystem/classes/TurbulenceBlock.md +764 -0
- package/data/typedoc-md/particlesystem/classes/UpdateAngleBlock.md +400 -0
- package/data/typedoc-md/particlesystem/classes/UpdateContext.md +379 -0
- package/data/typedoc-md/particlesystem/classes/UpdatePositionBlock.md +401 -0
- package/data/typedoc-md/particlesystem/classes/VFXBlock.md +357 -0
- package/data/typedoc-md/particlesystem/classes/VFXBlockRegistry.md +177 -0
- package/data/typedoc-md/particlesystem/classes/VFXBlockTypeNotFoundError.md +47 -0
- package/data/typedoc-md/particlesystem/classes/VFXBoxShape.md +686 -0
- package/data/typedoc-md/particlesystem/classes/VFXCircleShape.md +853 -0
- package/data/typedoc-md/particlesystem/classes/VFXConeShape.md +1026 -0
- package/data/typedoc-md/particlesystem/classes/VFXContext.md +317 -0
- package/data/typedoc-md/particlesystem/classes/VFXCurveAtlas.md +142 -0
- package/data/typedoc-md/particlesystem/classes/VFXDynamicBlock.md +449 -0
- package/data/typedoc-md/particlesystem/classes/VFXEdgeShape.md +725 -0
- package/data/typedoc-md/particlesystem/classes/VFXOutputContextRegistry.md +177 -0
- package/data/typedoc-md/particlesystem/classes/VFXOutputContextTypeNotFoundError.md +47 -0
- package/data/typedoc-md/particlesystem/classes/VFXShape.md +551 -0
- package/data/typedoc-md/particlesystem/classes/VFXShapeFactory.md +126 -0
- package/data/typedoc-md/particlesystem/classes/VFXShapeTypeNotFoundError.md +47 -0
- package/data/typedoc-md/particlesystem/classes/VFXSphereShape.md +896 -0
- package/data/typedoc-md/particlesystem/classes/VFXStaticBlock.md +411 -0
- package/data/typedoc-md/particlesystem/classes/VFXSystem.md +793 -0
- package/data/typedoc-md/particlesystem/classes/VFXSystemFactory.md +139 -0
- package/data/typedoc-md/particlesystem/classes/VFXTorusShape.md +941 -0
- package/data/typedoc-md/particlesystem/classes/VectorFieldForceBlock.md +596 -0
- package/data/typedoc-md/particlesystem/classes/VelocityOverLifetimeModule.md +910 -0
- package/data/typedoc-md/particlesystem/classes/VortexForceBlock.md +654 -0
- package/data/typedoc-md/particlesystem/enumerations/ParticleBlendingMode.md +83 -0
- package/data/typedoc-md/particlesystem/enumerations/ParticleColorCombineMode.md +97 -0
- package/data/typedoc-md/particlesystem/enumerations/ParticleSystemAnimationRowMode.md +41 -0
- package/data/typedoc-md/particlesystem/enumerations/ParticleSystemAnimationTimeMode.md +55 -0
- package/data/typedoc-md/particlesystem/enumerations/ParticleSystemAnimationType.md +41 -0
- package/data/typedoc-md/particlesystem/enumerations/ParticleSystemBillboardMode.md +69 -0
- package/data/typedoc-md/particlesystem/enumerations/ParticleSystemBoxShapeEmitFrom.md +55 -0
- package/data/typedoc-md/particlesystem/enumerations/ParticleSystemConeShapeEmitFrom.md +55 -0
- package/data/typedoc-md/particlesystem/enumerations/ParticleSystemInheritVelocityMode.md +43 -0
- package/data/typedoc-md/particlesystem/enumerations/ParticleSystemMeshShapeType.md +55 -0
- package/data/typedoc-md/particlesystem/enumerations/ParticleSystemNoiseQuality.md +55 -0
- package/data/typedoc-md/particlesystem/enumerations/ParticleSystemRandomSeeds.md +392 -0
- package/data/typedoc-md/particlesystem/enumerations/ParticleSystemRenderMode.md +56 -0
- package/data/typedoc-md/particlesystem/enumerations/ParticleSystemScalingMode.md +44 -0
- package/data/typedoc-md/particlesystem/enumerations/ParticleSystemShapeMultiModeValue.md +69 -0
- package/data/typedoc-md/particlesystem/enumerations/ParticleSystemShapeType.md +139 -0
- package/data/typedoc-md/particlesystem/enumerations/ParticleSystemSimulationSpace.md +44 -0
- package/data/typedoc-md/particlesystem/enumerations/ParticleSystemSortMode.md +86 -0
- package/data/typedoc-md/particlesystem/enumerations/ParticleSystemSubEmitterInheritFlags.md +114 -0
- package/data/typedoc-md/particlesystem/enumerations/ParticleSystemSubEmitterType.md +69 -0
- package/data/typedoc-md/particlesystem/enumerations/ParticleSystemTrailMode.md +41 -0
- package/data/typedoc-md/particlesystem/enumerations/ParticleSystemTrailTextureMode.md +69 -0
- package/data/typedoc-md/particlesystem/enumerations/QuadBlendingMode.md +83 -0
- package/data/typedoc-md/particlesystem/enumerations/QuadColorCombineMode.md +97 -0
- package/data/typedoc-md/particlesystem/enumerations/QuadUvMode.md +89 -0
- package/data/typedoc-md/particlesystem/enumerations/StripQuadUvMode.md +58 -0
- package/data/typedoc-md/particlesystem/enumerations/VFXBlockMode.md +41 -0
- package/data/typedoc-md/particlesystem/enumerations/VFXCollisionMode.md +41 -0
- package/data/typedoc-md/particlesystem/enumerations/VFXCollisionRadiusMode.md +55 -0
- package/data/typedoc-md/particlesystem/enumerations/VFXColorMode.md +57 -0
- package/data/typedoc-md/particlesystem/enumerations/VFXConeShapeHeightMode.md +41 -0
- package/data/typedoc-md/particlesystem/enumerations/VFXContextType.md +115 -0
- package/data/typedoc-md/particlesystem/enumerations/VFXDataType.md +41 -0
- package/data/typedoc-md/particlesystem/enumerations/VFXFlipbookAnimationRange.md +74 -0
- package/data/typedoc-md/particlesystem/enumerations/VFXFlipbookCyclesMode.md +55 -0
- package/data/typedoc-md/particlesystem/enumerations/VFXFlipbookFrameRateMode.md +69 -0
- package/data/typedoc-md/particlesystem/enumerations/VFXFlipbookPlayMode.md +41 -0
- package/data/typedoc-md/particlesystem/enumerations/VFXForceFalloff.md +41 -0
- package/data/typedoc-md/particlesystem/enumerations/VFXForceMode.md +41 -0
- package/data/typedoc-md/particlesystem/enumerations/VFXKillBoundsMode.md +41 -0
- package/data/typedoc-md/particlesystem/enumerations/VFXNoiseType.md +55 -0
- package/data/typedoc-md/particlesystem/enumerations/VFXShapePositionMode.md +69 -0
- package/data/typedoc-md/particlesystem/enumerations/VFXShapeSpawnMode.md +41 -0
- package/data/typedoc-md/particlesystem/enumerations/VFXSimulationSpace.md +44 -0
- package/data/typedoc-md/particlesystem/enumerations/VFXSoftBoundaryShape.md +41 -0
- package/data/typedoc-md/particlesystem/enumerations/VFXSortMode.md +87 -0
- package/data/typedoc-md/particlesystem/enumerations/VFXVelocityCompositionMode.md +69 -0
- package/data/typedoc-md/particlesystem/interfaces/Angle3DOverLifeBlockParams.md +88 -0
- package/data/typedoc-md/particlesystem/interfaces/AngleOverLifeBlockParams.md +60 -0
- package/data/typedoc-md/particlesystem/interfaces/AngularVelocity3DOverLifeBlockParams.md +88 -0
- package/data/typedoc-md/particlesystem/interfaces/AngularVelocityOverLifeBlockParams.md +60 -0
- package/data/typedoc-md/particlesystem/interfaces/BillboardParticleRendererParams.md +511 -0
- package/data/typedoc-md/particlesystem/interfaces/BuoyancyBlockParams.md +104 -0
- package/data/typedoc-md/particlesystem/interfaces/CollisionBoxBlockParams.md +278 -0
- package/data/typedoc-md/particlesystem/interfaces/CollisionCylinderBlockParams.md +318 -0
- package/data/typedoc-md/particlesystem/interfaces/CollisionPlaneBlockParams.md +278 -0
- package/data/typedoc-md/particlesystem/interfaces/CollisionSphereBlockParams.md +278 -0
- package/data/typedoc-md/particlesystem/interfaces/ColorOverLifeBlockParams.md +86 -0
- package/data/typedoc-md/particlesystem/interfaces/ConformSphereBlockParams.md +164 -0
- package/data/typedoc-md/particlesystem/interfaces/CustomParticleRendererParams.md +93 -0
- package/data/typedoc-md/particlesystem/interfaces/EmissionEmitContext.md +156 -0
- package/data/typedoc-md/particlesystem/interfaces/FlipbookPlayerBlockParams.md +307 -0
- package/data/typedoc-md/particlesystem/interfaces/ForceBlockParams.md +124 -0
- package/data/typedoc-md/particlesystem/interfaces/GravityBlockParams.md +64 -0
- package/data/typedoc-md/particlesystem/interfaces/KillByBoxBlockParams.md +104 -0
- package/data/typedoc-md/particlesystem/interfaces/KillByCylinderBlockParams.md +144 -0
- package/data/typedoc-md/particlesystem/interfaces/KillByPlaneBlockParams.md +104 -0
- package/data/typedoc-md/particlesystem/interfaces/KillBySphereBlockParams.md +104 -0
- package/data/typedoc-md/particlesystem/interfaces/LinearDragBlockParams.md +84 -0
- package/data/typedoc-md/particlesystem/interfaces/MeshOutputContextParams.md +129 -0
- package/data/typedoc-md/particlesystem/interfaces/MeshParticleRendererParams.md +139 -0
- package/data/typedoc-md/particlesystem/interfaces/MultiplyScaleOverLifeBlockParams.md +106 -0
- package/data/typedoc-md/particlesystem/interfaces/NoneParticleRendererParams.md +82 -0
- package/data/typedoc-md/particlesystem/interfaces/OrientFixedAxisBlockParams.md +64 -0
- package/data/typedoc-md/particlesystem/interfaces/OrientLookAtPositionBlockParams.md +64 -0
- package/data/typedoc-md/particlesystem/interfaces/ParticleBlendingOptions.md +127 -0
- package/data/typedoc-md/particlesystem/interfaces/ParticleLightParams.md +59 -0
- package/data/typedoc-md/particlesystem/interfaces/ParticleRendererParams.md +63 -0
- package/data/typedoc-md/particlesystem/interfaces/ParticleSystemModuleParams.md +375 -0
- package/data/typedoc-md/particlesystem/interfaces/ParticleSystemParams.md +137 -0
- package/data/typedoc-md/particlesystem/interfaces/PointAttractRepelBlockParams.md +124 -0
- package/data/typedoc-md/particlesystem/interfaces/QuadBlendingOptions.md +127 -0
- package/data/typedoc-md/particlesystem/interfaces/QuadOutputContextParams.md +496 -0
- package/data/typedoc-md/particlesystem/interfaces/SetAngle3DBlockParams.md +104 -0
- package/data/typedoc-md/particlesystem/interfaces/SetAngleBlockParams.md +84 -0
- package/data/typedoc-md/particlesystem/interfaces/SetAngularVelocity3DBlockParams.md +104 -0
- package/data/typedoc-md/particlesystem/interfaces/SetAngularVelocityBlockParams.md +64 -0
- package/data/typedoc-md/particlesystem/interfaces/SetColorBlockParams.md +58 -0
- package/data/typedoc-md/particlesystem/interfaces/SetColorBySpeedBlockParams.md +106 -0
- package/data/typedoc-md/particlesystem/interfaces/SetLifetimeBlockParams.md +64 -0
- package/data/typedoc-md/particlesystem/interfaces/SetMassBlockParams.md +64 -0
- package/data/typedoc-md/particlesystem/interfaces/SetPositionBlockParams.md +58 -0
- package/data/typedoc-md/particlesystem/interfaces/SetSize3DBlockParams.md +104 -0
- package/data/typedoc-md/particlesystem/interfaces/SetSizeBlockParams.md +64 -0
- package/data/typedoc-md/particlesystem/interfaces/SetSizeBySpeedBlockParams.md +86 -0
- package/data/typedoc-md/particlesystem/interfaces/SetVelocityBlockParams.md +164 -0
- package/data/typedoc-md/particlesystem/interfaces/SetVelocityTangentBlockParams.md +165 -0
- package/data/typedoc-md/particlesystem/interfaces/SizeOverLifeBlockParams.md +66 -0
- package/data/typedoc-md/particlesystem/interfaces/SoftBoundaryForceBlockParams.md +164 -0
- package/data/typedoc-md/particlesystem/interfaces/StripQuadOutputContextParams.md +395 -0
- package/data/typedoc-md/particlesystem/interfaces/SubEmitter.md +73 -0
- package/data/typedoc-md/particlesystem/interfaces/SubEmitterInheritProperties.md +167 -0
- package/data/typedoc-md/particlesystem/interfaces/TrailsModuleParams.md +313 -0
- package/data/typedoc-md/particlesystem/interfaces/TriggerEventOnCollideBlockParams.md +67 -0
- package/data/typedoc-md/particlesystem/interfaces/TriggerEventOnDieBlockParams.md +67 -0
- package/data/typedoc-md/particlesystem/interfaces/TurbulenceBlockParams.md +224 -0
- package/data/typedoc-md/particlesystem/interfaces/VFXBlockParams.md +79 -0
- package/data/typedoc-md/particlesystem/interfaces/VFXBoxShapeParams.md +214 -0
- package/data/typedoc-md/particlesystem/interfaces/VFXBurstRule.md +87 -0
- package/data/typedoc-md/particlesystem/interfaces/VFXCPUEvent.md +77 -0
- package/data/typedoc-md/particlesystem/interfaces/VFXCircleShapeParams.md +306 -0
- package/data/typedoc-md/particlesystem/interfaces/VFXConeShapeParams.md +387 -0
- package/data/typedoc-md/particlesystem/interfaces/VFXCurveSlot.md +59 -0
- package/data/typedoc-md/particlesystem/interfaces/VFXCurveSlots.md +37 -0
- package/data/typedoc-md/particlesystem/interfaces/VFXEdgeShapeParams.md +223 -0
- package/data/typedoc-md/particlesystem/interfaces/VFXOutputShade.md +145 -0
- package/data/typedoc-md/particlesystem/interfaces/VFXShapeArcParams.md +82 -0
- package/data/typedoc-md/particlesystem/interfaces/VFXShapeParams.md +140 -0
- package/data/typedoc-md/particlesystem/interfaces/VFXShapeVolumeParams.md +213 -0
- package/data/typedoc-md/particlesystem/interfaces/VFXSphereShapeParams.md +327 -0
- package/data/typedoc-md/particlesystem/interfaces/VFXSystemParams.md +335 -0
- package/data/typedoc-md/particlesystem/interfaces/VFXTorusShapeParams.md +346 -0
- package/data/typedoc-md/particlesystem/interfaces/VectorFieldForceBlockParams.md +147 -0
- package/data/typedoc-md/particlesystem/interfaces/VortexForceBlockParams.md +164 -0
- package/data/typedoc-md/particlesystem/type-aliases/ParticleModuleConstructor.md +33 -0
- package/data/typedoc-md/particlesystem/type-aliases/ParticleRendererConstructor.md +43 -0
- package/data/typedoc-md/particlesystem/type-aliases/ParticleRendererOptions.md +15 -0
- package/data/typedoc-md/particlesystem/type-aliases/VFXBlockCtor.md +53 -0
- package/data/typedoc-md/particlesystem/type-aliases/VFXOutputContextCtor.md +35 -0
- package/data/typedoc-md/particlesystem/type-aliases/VFXOutputContextFactory.md +35 -0
- package/data/typedoc-md/particlesystem/type-aliases/VFXShapeCtor.md +35 -0
- package/data/typedoc-md/particlesystem/type-aliases/VFXSystemTemplate.md +19 -0
- package/data/typedoc-md/particlesystem/variables/DEFAULT_PARTICLE_PER_STRIP_COUNT.md +20 -0
- package/data/typedoc-md/particlesystem/variables/DEFAULT_STRIP_MAX_PARTICLES.md +22 -0
- package/data/typedoc-md/particlesystem/variables/MAX_BURSTS.md +13 -0
- package/data/typedoc-md/particlesystem/variables/MAX_EVENTS.md +13 -0
- package/data/typedoc-md/particlesystem/variables/PARTICLESYSTEM_VERSION.md +13 -0
- package/data/typedoc-md/postprocessing/README.md +20 -0
- package/data/typedoc-md/postprocessing/classes/OffscreenPass.md +184 -0
- package/data/typedoc-md/postprocessing/classes/PostprocessingSceneRenderer.md +330 -0
- package/data/typedoc-md/postprocessing/classes/SSFEffect.md +584 -0
- package/data/typedoc-md/postprocessing/interfaces/PostprocessingSceneRendererParams.md +115 -0
- package/data/typedoc-md/postprocessing/interfaces/ScreenSpaceFogEffectParams.md +420 -0
- package/data/typedoc-md/postprocessing/variables/POSTPROCESSING_VERSION.md +11 -0
- package/dist/server.js +1301 -0
- package/package.json +46 -4
- package/resources/examples/.gitkeep +0 -0
- package/resources/examples/ambient-light.md +47 -0
- package/resources/examples/animation-curve.md +62 -0
- package/resources/examples/animation.md +56 -0
- package/resources/examples/annotation.md +68 -0
- package/resources/examples/auto-exposure-node.md +67 -0
- package/resources/examples/billboard-particle-renderer.md +85 -0
- package/resources/examples/bool-update-flag.md +61 -0
- package/resources/examples/clip-animation-controller.md +76 -0
- package/resources/examples/clip-plane-updater.md +63 -0
- package/resources/examples/color-grading-node.md +59 -0
- package/resources/examples/command-group.md +48 -0
- package/resources/examples/command-history.md +59 -0
- package/resources/examples/command.md +55 -0
- package/resources/examples/components-manager.md +43 -0
- package/resources/examples/controls.md +52 -0
- package/resources/examples/directional-light.md +49 -0
- package/resources/examples/dither-node.md +55 -0
- package/resources/examples/emit-context.md +71 -0
- package/resources/examples/entity.md +47 -0
- package/resources/examples/environment.md +51 -0
- package/resources/examples/event-dispatcher.md +62 -0
- package/resources/examples/event-spawn-context.md +67 -0
- package/resources/examples/geometry-resource.md +50 -0
- package/resources/examples/gltf-parser.md +78 -0
- package/resources/examples/gltf-resource.md +61 -0
- package/resources/examples/glyph-atlas.md +74 -0
- package/resources/examples/gradient.md +70 -0
- package/resources/examples/grain-node.md +57 -0
- package/resources/examples/hemisphere-light.md +49 -0
- package/resources/examples/instanced-model-renderer.md +99 -0
- package/resources/examples/karis-bloom-node.md +56 -0
- package/resources/examples/label.md +77 -0
- package/resources/examples/lens-flare-node.md +65 -0
- package/resources/examples/light-probe-group.md +53 -0
- package/resources/examples/light-probe.md +52 -0
- package/resources/examples/linear-picker.md +50 -0
- package/resources/examples/lut-resource.md +52 -0
- package/resources/examples/material-resource.md +63 -0
- package/resources/examples/memory-estimator.md +81 -0
- package/resources/examples/mesh-output-context.md +69 -0
- package/resources/examples/mesh-particle-renderer.md +71 -0
- package/resources/examples/mesh-renderer.md +49 -0
- package/resources/examples/min-max-curve.md +57 -0
- package/resources/examples/min-max-gradient.md +58 -0
- package/resources/examples/model-renderer.md +83 -0
- package/resources/examples/none-particle-renderer.md +59 -0
- package/resources/examples/offscreen-pass.md +46 -0
- package/resources/examples/orbit-controls.md +51 -0
- package/resources/examples/orthographic-camera.md +49 -0
- package/resources/examples/parallel-light.md +49 -0
- package/resources/examples/particle-module-registry.md +65 -0
- package/resources/examples/particle-renderer-registry.md +72 -0
- package/resources/examples/particle-system-factory.md +60 -0
- package/resources/examples/particle-system.md +85 -0
- package/resources/examples/perspective-camera.md +49 -0
- package/resources/examples/picker.md +58 -0
- package/resources/examples/point-light.md +50 -0
- package/resources/examples/postprocessing-scene-renderer.md +56 -0
- package/resources/examples/quad-output-context.md +75 -0
- package/resources/examples/random.md +57 -0
- package/resources/examples/rect-area-light.md +50 -0
- package/resources/examples/rectangle-culling.md +72 -0
- package/resources/examples/render-debug-info.md +67 -0
- package/resources/examples/renderer.md +53 -0
- package/resources/examples/resource-manager.md +61 -0
- package/resources/examples/resource-ref.md +55 -0
- package/resources/examples/scene-coordinate-system.md +66 -0
- package/resources/examples/scene-renderer.md +48 -0
- package/resources/examples/scene.md +49 -0
- package/resources/examples/script.md +54 -0
- package/resources/examples/scriptable-scene-renderer.md +58 -0
- package/resources/examples/sdf-glyph-generator.md +77 -0
- package/resources/examples/solid-color-background.md +45 -0
- package/resources/examples/spawn-context.md +58 -0
- package/resources/examples/spot-light.md +50 -0
- package/resources/examples/ssf-effect.md +66 -0
- package/resources/examples/ssf-node.md +78 -0
- package/resources/examples/strip-quad-output-context.md +69 -0
- package/resources/examples/sub-emitter-birth-instance.md +73 -0
- package/resources/examples/task-controller.md +66 -0
- package/resources/examples/texture-atlas.md +67 -0
- package/resources/examples/texture-background.md +53 -0
- package/resources/examples/texture-resource.md +53 -0
- package/resources/examples/tilted-view-clip-plane-estimator.md +66 -0
- package/resources/examples/top-down-clip-plane-estimator.md +67 -0
- package/resources/examples/transform.md +52 -0
- package/resources/examples/uniforms-lib.md +75 -0
- package/resources/examples/update-context.md +57 -0
- package/resources/examples/update-flag-manager.md +68 -0
- package/resources/examples/value-noise.md +60 -0
- package/resources/examples/vfx-block-registry.md +76 -0
- package/resources/examples/vfx-box-shape.md +60 -0
- package/resources/examples/vfx-circle-shape.md +62 -0
- package/resources/examples/vfx-cone-shape.md +67 -0
- package/resources/examples/vfx-curve-atlas.md +65 -0
- package/resources/examples/vfx-edge-shape.md +60 -0
- package/resources/examples/vfx-output-context-registry.md +84 -0
- package/resources/examples/vfx-shape-factory.md +63 -0
- package/resources/examples/vfx-sphere-shape.md +61 -0
- package/resources/examples/vfx-system-factory.md +67 -0
- package/resources/examples/vfx-system.md +88 -0
- package/resources/examples/vfx-torus-shape.md +61 -0
- package/resources/examples/webgl-engine.md +52 -0
- package/resources/examples/webgpu-engine.md +53 -0
- package/resources/examples/worker-manager.md +77 -0
- package/resources/examples/worker-pool.md +78 -0
- package/resources/examples/worker-registry.md +70 -0
- package/resources/guides/.gitkeep +0 -0
- package/resources/guides/animation.md +65 -0
- package/resources/guides/annotation.md +63 -0
- package/resources/guides/atlas.md +93 -0
- package/resources/guides/background.md +62 -0
- package/resources/guides/blocks.md +91 -0
- package/resources/guides/camera.md +67 -0
- package/resources/guides/clip-plane.md +60 -0
- package/resources/guides/command.md +81 -0
- package/resources/guides/component-renderer.md +64 -0
- package/resources/guides/component.md +64 -0
- package/resources/guides/contexts.md +100 -0
- package/resources/guides/controls.md +61 -0
- package/resources/guides/coordinate-systems.md +68 -0
- package/resources/guides/culling.md +82 -0
- package/resources/guides/data-structures.md +85 -0
- package/resources/guides/debug.md +76 -0
- package/resources/guides/effect-node.md +84 -0
- package/resources/guides/effect.md +69 -0
- package/resources/guides/engine.md +69 -0
- package/resources/guides/entity.md +57 -0
- package/resources/guides/environment.md +49 -0
- package/resources/guides/estimator.md +74 -0
- package/resources/guides/event.md +60 -0
- package/resources/guides/gltf.md +93 -0
- package/resources/guides/gradient.md +97 -0
- package/resources/guides/instanced-model-renderer.md +92 -0
- package/resources/guides/label.md +79 -0
- package/resources/guides/light-probe.md +81 -0
- package/resources/guides/light.md +82 -0
- package/resources/guides/logger.md +50 -0
- package/resources/guides/material.md +61 -0
- package/resources/guides/math.md +88 -0
- package/resources/guides/memory.md +84 -0
- package/resources/guides/mesh-renderer.md +59 -0
- package/resources/guides/model-renderer.md +78 -0
- package/resources/guides/module.md +97 -0
- package/resources/guides/pass.md +49 -0
- package/resources/guides/pick.md +65 -0
- package/resources/guides/postprocessing.md +56 -0
- package/resources/guides/registry.md +64 -0
- package/resources/guides/resource.md +83 -0
- package/resources/guides/scene.md +90 -0
- package/resources/guides/script.md +63 -0
- package/resources/guides/sdf.md +80 -0
- package/resources/guides/shapes.md +99 -0
- package/resources/guides/shuriken-factory.md +51 -0
- package/resources/guides/shuriken-renderer.md +82 -0
- package/resources/guides/shuriken.md +76 -0
- package/resources/guides/transform.md +60 -0
- package/resources/guides/update-flag.md +80 -0
- package/resources/guides/utils-curve.md +88 -0
- package/resources/guides/value.md +66 -0
- package/resources/guides/vfx-curve.md +74 -0
- package/resources/guides/vfx-factory.md +77 -0
- package/resources/guides/vfx.md +102 -0
- package/resources/guides/worker.md +127 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
slug: debug
|
|
3
|
+
title: 渲染调试
|
|
4
|
+
aliases:
|
|
5
|
+
- 渲染调试
|
|
6
|
+
- 渲染统计
|
|
7
|
+
- render debug
|
|
8
|
+
- draw call 统计
|
|
9
|
+
keywords:
|
|
10
|
+
- RenderDebugInfo
|
|
11
|
+
- drawCalls
|
|
12
|
+
- triangles
|
|
13
|
+
- autoReset
|
|
14
|
+
- 显存占用
|
|
15
|
+
summary: RenderDebugInfo 包一层渲染器的 info,按帧读出 draw call、三角面与显存占用;WebGL 与 WebGPU 返回的字段不同。
|
|
16
|
+
tags:
|
|
17
|
+
- core
|
|
18
|
+
relatedExamples:
|
|
19
|
+
- render-debug-info
|
|
20
|
+
relatedApiIds:
|
|
21
|
+
- core:class:RenderDebugInfo
|
|
22
|
+
- core:interface:DebugInfo
|
|
23
|
+
- core:interface:RenderInfo
|
|
24
|
+
- core:interface:ComputeInfo
|
|
25
|
+
- core:interface:MemoryInfo
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
# 渲染调试
|
|
29
|
+
|
|
30
|
+
## 适用场景
|
|
31
|
+
|
|
32
|
+
已经有引擎实例,要把每帧的 draw call、三角面数、显存占用读到 HUD 或日志里时读这篇。
|
|
33
|
+
|
|
34
|
+
## 核心概念
|
|
35
|
+
|
|
36
|
+
`RenderDebugInfo` 是包在 three.js 渲染器 `info` 之上的薄包装。构造时传入后端渲染器(`engine.renderer`),`getDebugInfo()` 读一次快照。
|
|
37
|
+
|
|
38
|
+
它**不采集**也不缓存,每次调用都是即时读取。WebGL 与 WebGPU 返回的字段集合不同:WebGL 只有基础项,WebGPU 多出累积调用数、compute 段和分项字节数。
|
|
39
|
+
|
|
40
|
+
注意它读的是渲染器 `info` 的**当前值**,而 `info` 默认每帧自动清零,所以想拿累积值要先关掉自动清零。
|
|
41
|
+
|
|
42
|
+
## 最小示例
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
const debug = new RenderDebugInfo(engine.renderer);
|
|
46
|
+
|
|
47
|
+
const info = debug.getDebugInfo();
|
|
48
|
+
const draws = info.render.drawCalls;
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## 常用 API
|
|
52
|
+
|
|
53
|
+
- [`RenderDebugInfo`](vista3d://api/id/core:class:RenderDebugInfo) — 调试包装:`renderer`、`autoReset`、`getDebugInfo`、`reset`
|
|
54
|
+
- [`DebugInfo`](vista3d://api/id/core:interface:DebugInfo) — 快照:`frame`、`render`、`compute`、`memory`
|
|
55
|
+
- [`RenderInfo`](vista3d://api/id/core:interface:RenderInfo) — 绘制计数:`drawCalls`、`triangles`、`points`、`lines`,WebGPU 另有 `calls`、`frameCalls`
|
|
56
|
+
- [`ComputeInfo`](vista3d://api/id/core:interface:ComputeInfo) — 计算计数(仅 WebGPU):`calls`、`frameCalls`
|
|
57
|
+
- [`MemoryInfo`](vista3d://api/id/core:interface:MemoryInfo) — 占用:`geometries`、`textures` 必有,其余多为 WebGPU
|
|
58
|
+
|
|
59
|
+
## 注意事项
|
|
60
|
+
|
|
61
|
+
- 构造:`const debug = new RenderDebugInfo(engine.renderer);` 传的是后端渲染器,不是 `Engine`
|
|
62
|
+
- 读快照:`const info = debug.getDebugInfo();` 每次都是即时读取,不缓存
|
|
63
|
+
- 帧号:`const frame = info.frame;`
|
|
64
|
+
- 绘制计数:`const draws = info.render.drawCalls;`、`info.render.triangles`、`info.render.points`、`info.render.lines`
|
|
65
|
+
- WebGPU 额外字段:`info.render.calls`(启动至今累积)、`info.render.frameCalls`(本帧),WebGL 下这两个是 `undefined`
|
|
66
|
+
- 计算计数(仅 WebGPU):`const compute = info.compute;` 有 `calls` 与 `frameCalls`;WebGL 下整个 `compute` 是 `undefined`
|
|
67
|
+
- 显存公共项:`info.memory.geometries`、`info.memory.textures` 两种后端都有
|
|
68
|
+
- WebGL 额外有 `info.memory.programs`(程序数量),没有分项字节数
|
|
69
|
+
- WebGPU 额外有 `attributes`、`attributesSize`、`indexAttributes`、`indexAttributesSize`、`texturesSize`、`programsSize`、`total`
|
|
70
|
+
- 字段可缺:取值前要判空,尤其 `compute` 与各 `*Size`,WebGL 下都不存在
|
|
71
|
+
- 自动清零:`debug.autoReset = false;` 关掉渲染器每帧清零,读到的才是累积值;恢复写 `true`
|
|
72
|
+
- 读自动清零开关:`const resetting = debug.autoReset;`
|
|
73
|
+
- 手动清零:`debug.reset();` 清掉渲染器 info 的计数
|
|
74
|
+
- 想统计「一帧总量」时:先 `autoReset = false`、在帧首 `reset()`、帧尾 `getDebugInfo()`
|
|
75
|
+
- 包一层不改渲染行为,只读计数
|
|
76
|
+
- `renderer` 是公开只读字段:`const r = debug.renderer;` 换渲染器要重新构造
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
slug: effect-node
|
|
3
|
+
title: TSL 效果节点
|
|
4
|
+
aliases:
|
|
5
|
+
- 效果节点
|
|
6
|
+
- TSL 后处理
|
|
7
|
+
- 后期效果
|
|
8
|
+
keywords:
|
|
9
|
+
- ColorGradingNode
|
|
10
|
+
- DitherNode
|
|
11
|
+
- GrainNode
|
|
12
|
+
- KarisBloomNode
|
|
13
|
+
- AutoExposureNode
|
|
14
|
+
- LensFlareNode
|
|
15
|
+
- SSFNode
|
|
16
|
+
- screen-space fog
|
|
17
|
+
- bloom
|
|
18
|
+
- auto exposure
|
|
19
|
+
- color grading
|
|
20
|
+
- film grain
|
|
21
|
+
- dither
|
|
22
|
+
- lens flare
|
|
23
|
+
summary: 把 ColorGrading/Bloom/AutoExposure/Grain/Dither/LensFlare/SSF 这些 TSL 节点接到 ScriptableSceneRenderer 输出。
|
|
24
|
+
tags:
|
|
25
|
+
- core
|
|
26
|
+
relatedExamples:
|
|
27
|
+
- color-grading-node
|
|
28
|
+
- dither-node
|
|
29
|
+
- grain-node
|
|
30
|
+
- karis-bloom-node
|
|
31
|
+
- auto-exposure-node
|
|
32
|
+
- lens-flare-node
|
|
33
|
+
- ssf-node
|
|
34
|
+
relatedApiIds:
|
|
35
|
+
- core:class:ColorGradingNode
|
|
36
|
+
- core:class:DitherNode
|
|
37
|
+
- core:class:GrainNode
|
|
38
|
+
- core:class:KarisBloomNode
|
|
39
|
+
- core:class:AutoExposureNode
|
|
40
|
+
- core:class:LensFlareNode
|
|
41
|
+
- core:class:SSFNode
|
|
42
|
+
- core:interface:CloudSample
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
# TSL 效果节点
|
|
46
|
+
|
|
47
|
+
## 适用场景
|
|
48
|
+
|
|
49
|
+
已经在 `WebGPUEngine` + `ScriptableSceneRenderer` 下拿到场景颜色 node,要接 bloom、自动曝光、调色、grain、dither、镜头光晕或屏幕空间雾时读这篇。
|
|
50
|
+
|
|
51
|
+
## 核心概念
|
|
52
|
+
|
|
53
|
+
这些类是 TSL Node:输入是调用方已有的 TSL 颜色(和深度)node,返回新的颜色 node;接到 `ScriptableSceneRenderer` 的 `output`。
|
|
54
|
+
|
|
55
|
+
顺序:SSF / AutoExposure / KarisBloom / LensFlare / ColorGrading 处理线性 HDR;tone mapping / sRGB 编码之后才接 Grain / Dither。
|
|
56
|
+
|
|
57
|
+
## 最小示例
|
|
58
|
+
|
|
59
|
+
```ts
|
|
60
|
+
const output = colorGrading(colorNode);
|
|
61
|
+
scene.sceneRenderer = new ScriptableSceneRenderer(engine, { output });
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## 常用 API
|
|
65
|
+
|
|
66
|
+
- [`ColorGradingNode`](vista3d://api/id/core:class:ColorGradingNode) — 线性 HDR 调色:`warmth`、`saturation`、`contrast`、`vignette`
|
|
67
|
+
- [`DitherNode`](vista3d://api/id/core:class:DitherNode) — LDR dither:`colorNode`;通常最后一步
|
|
68
|
+
- [`GrainNode`](vista3d://api/id/core:class:GrainNode) — LDR film grain:`grain`
|
|
69
|
+
- [`KarisBloomNode`](vista3d://api/id/core:class:KarisBloomNode) — bloom:输入 TSL 纹理 node,输出只有 bloom;`bloom`、`meter`、`dispose`
|
|
70
|
+
- [`AutoExposureNode`](vista3d://api/id/core:class:AutoExposureNode) — 自动曝光:`targetLuminance`、`minExposure`、`maxExposure` 等,`computeAdapt`
|
|
71
|
+
- [`LensFlareNode`](vista3d://api/id/core:class:LensFlareNode) — 镜头光晕:`camera`、`depth`、`sunDirection`、`sunColor`、`sunIntensity`,`computeVisibility`
|
|
72
|
+
- [`SSFNode`](vista3d://api/id/core:class:SSFNode) — 屏幕空间高度雾:`colorNode`、`depthNode`、`fog*`、`noise*`、相机矩阵
|
|
73
|
+
|
|
74
|
+
## 注意事项
|
|
75
|
+
|
|
76
|
+
- `colorNode` 是调用方已有的 TSL 颜色 node;`KarisBloomNode` 的输入是 TSL 纹理 node;SSF / LensFlare 还需要场景深度
|
|
77
|
+
- `ColorGradingNode` 输入、输出都在线性 HDR;放在 tone mapping 之前
|
|
78
|
+
- `DitherNode` / `GrainNode` 的输入必须已经 tone-mapped / encoded 到约 `0..1`;不要接在线性 HDR 或 ColorGrading 后
|
|
79
|
+
- `outputColorTransform` 默认 `true`;接 Grain / Dither 时用 `outputColorTransform: false`,并确保输入已经是 LDR
|
|
80
|
+
- `KarisBloomNode.setup()` 只输出 bloom,不包含场景色;调用方自己 `colorNode.add(bloomNode)` 合成;`bloom` 默认 `0.05`;用完 `bloomNode.dispose()`
|
|
81
|
+
- `AutoExposureNode` 的曝光因子晚一帧生效;`updateBefore` 写时间步,渲染后要在 `afterRender` 调 `computeAdapt(renderer)`
|
|
82
|
+
- `LensFlareNode` 的可见度晚一帧生效;`updateBefore` 写太阳屏幕位置,渲染后要在 `afterRender` 调 `computeVisibility(renderer)`;`camera` 必须是场景 PerspectiveCamera
|
|
83
|
+
- `SSFNode` 不会自己更新相机矩阵;用 `ScriptableSceneRenderer` 的 `beforeRender` 每帧写 `cameraWorldMatrix` / `cameraProjectionMatrixInverse` / `cameraNear` / `cameraFar`
|
|
84
|
+
- 这些 node 的 `setup` / `updateBefore` 由 TSL node system 调,不要手动调;`KarisBloomNode` 有显式 `dispose`,其余效果节点跟随渲染器/管线释放
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
slug: effect
|
|
3
|
+
title: 屏幕空间雾效果
|
|
4
|
+
aliases:
|
|
5
|
+
- SSF 效果
|
|
6
|
+
- webgl 高度雾
|
|
7
|
+
- 后处理雾
|
|
8
|
+
- webgl 后处理效果
|
|
9
|
+
keywords:
|
|
10
|
+
- fogColor
|
|
11
|
+
- fogDensity
|
|
12
|
+
- fogHeight
|
|
13
|
+
- noiseScale
|
|
14
|
+
- inscattering
|
|
15
|
+
- 屏幕空间雾
|
|
16
|
+
- ssf
|
|
17
|
+
summary: SSFEffect 是 WebGL 后处理雾;构造后 addEffect 挂到 PostprocessingSceneRenderer,并设 mainCamera。
|
|
18
|
+
tags:
|
|
19
|
+
- postprocessing
|
|
20
|
+
relatedExamples:
|
|
21
|
+
- ssf-effect
|
|
22
|
+
relatedApiIds:
|
|
23
|
+
- postprocessing:class:SSFEffect
|
|
24
|
+
- postprocessing:interface:ScreenSpaceFogEffectParams
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
# 屏幕空间雾效果
|
|
28
|
+
|
|
29
|
+
## 适用场景
|
|
30
|
+
|
|
31
|
+
已经有 `camera`,要在 WebGL 后处理链上建屏幕空间高度雾时读这篇。
|
|
32
|
+
|
|
33
|
+
## 核心概念
|
|
34
|
+
|
|
35
|
+
`SSFEffect` 继承 postprocessing 包的 Effect。构造收 `ScreenSpaceFogEffectParams`。属性都是 setter:颜色用 `set`,`noiseSpeed` copy,`inscatteringLightDirection` 会 normalize。`update` / `setSize` / `initialize` 由 composer 调。
|
|
36
|
+
|
|
37
|
+
## 最小示例
|
|
38
|
+
|
|
39
|
+
```ts
|
|
40
|
+
const effect = new SSFEffect();
|
|
41
|
+
effect.mainCamera = camera.native;
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## 常用 API
|
|
45
|
+
|
|
46
|
+
- [`SSFEffect`](vista3d://api/id/postprocessing:class:SSFEffect) — 屏幕空间雾:`enabled`、`mainCamera`、`fog*`、`noise*`、散射光
|
|
47
|
+
- [`ScreenSpaceFogEffectParams`](vista3d://api/id/postprocessing:interface:ScreenSpaceFogEffectParams) — 构造参数,字段与 setter 对应
|
|
48
|
+
|
|
49
|
+
## 注意事项
|
|
50
|
+
|
|
51
|
+
- 这些字段都是只写 setter,没有 getter,不要读 `effect.fogColor`
|
|
52
|
+
- 构造:`const effect = new SSFEffect();` 或 `new SSFEffect({ fogColor: '#bccbda', fogDensity: 0.02 });`
|
|
53
|
+
- 挂相机:`effect.mainCamera = camera.native;` 不设时 `update` 不推进噪声时间、不写相机位置
|
|
54
|
+
- 开关:`effect.enabled = false;` 默认 `true`
|
|
55
|
+
- 雾色:`effect.fogColor = '#bccbda';` 默认 `'#bccbda'`
|
|
56
|
+
- 最大不透明度:`effect.fogMaxOpacity = 1;` 会夹到 `0`~`1`,默认 `1`
|
|
57
|
+
- 密度:`effect.fogDensity = 0.02;` 默认 `0.02`
|
|
58
|
+
- 基高:`effect.fogHeight = 10;` 默认 `10`
|
|
59
|
+
- 高度衰减:`effect.fogHeightFalloff = 0.25;` 默认 `0.25`
|
|
60
|
+
- 起始距离:`effect.fogStartDistance = 0;` 默认 `0`
|
|
61
|
+
- 噪声强度:`effect.noiseStrength = 0.1;` 默认 `0.1`
|
|
62
|
+
- 噪声频率:`effect.noiseScale = 0.01;` 默认 `0.01`
|
|
63
|
+
- 噪声流速:`effect.noiseSpeed = new Vector2(0.01, 0.01);` copy 进去,默认 `(0.01, 0.01)`;`Vector2` 从 `three` 引入
|
|
64
|
+
- 散射光方向:`effect.inscatteringLightDirection = new Vector3(0, -1, 0);` 会 normalize,默认 `(0, -1, 0)`;`Vector3` 从 `three` 引入
|
|
65
|
+
- 散射光颜色:`effect.directionalInscatteringColor = '#fff3da';` 默认 `'#fff3da'`
|
|
66
|
+
- 散射光锐度:`effect.directionalInscatteringExponent = 8;` 默认 `8`
|
|
67
|
+
- 散射光起始距离:`effect.directionalInscatteringStartDistance = 0;` 默认 `0`
|
|
68
|
+
- 混色:`blendFunction` 默认 `BlendFunction.NORMAL`;分辨率默认 `Resolution.AUTO_SIZE`,`resolutionScale` 默认 `1`
|
|
69
|
+
- `update` / `setSize` / `initialize` 由 composer 调,不要自己当每帧入口
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
slug: engine
|
|
3
|
+
title: 引擎后端
|
|
4
|
+
aliases:
|
|
5
|
+
- 引擎
|
|
6
|
+
- engine
|
|
7
|
+
- 渲染循环
|
|
8
|
+
- render loop
|
|
9
|
+
keywords:
|
|
10
|
+
- 创建引擎
|
|
11
|
+
- create engine
|
|
12
|
+
summary: 用 WebGLEngine 或 WebGPUEngine 创建渲染循环。构造后自动跑帧,Engine 是抽象基类。
|
|
13
|
+
tags:
|
|
14
|
+
- core
|
|
15
|
+
relatedExamples:
|
|
16
|
+
- webgl-engine
|
|
17
|
+
- webgpu-engine
|
|
18
|
+
relatedApiIds:
|
|
19
|
+
- core:class:Engine
|
|
20
|
+
- core:class:EngineObject
|
|
21
|
+
- core:class:WebGLEngine
|
|
22
|
+
- core:class:WebGPUEngine
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
# 引擎后端
|
|
26
|
+
|
|
27
|
+
## 适用场景
|
|
28
|
+
|
|
29
|
+
要选 WebGL 或 WebGPU、把渲染循环接到页面时读这篇。
|
|
30
|
+
|
|
31
|
+
## 核心概念
|
|
32
|
+
|
|
33
|
+
`Engine` 持有动画循环、场景列表、资源管理和视口事件。它是抽象类,真正 `new` 的是 `WebGLEngine` 或 `WebGPUEngine`。子类构造时会创建后端渲染器并 `setAnimationLoop`,没有单独的 `run()`。
|
|
34
|
+
|
|
35
|
+
构造参数是 `EngineParams`:`maxFps`、`logLevel`、`cacheClearIntervalMs`、`renderer`。`renderer` 在 WebGL 下是 `WebGLParams`,在 WebGPU 下是 `WebGPUParams`。
|
|
36
|
+
|
|
37
|
+
画布有两种接法:把 `renderer.viewport` 设成容器,引擎自己建 canvas 并挂进去;或把 `renderer.canvas` 设成已有 canvas,此时忽略 viewport。
|
|
38
|
+
|
|
39
|
+
`EngineObject` 是挂在某个引擎上的对象基类,构造时传入 `engine`。不要 `new EngineObject`。
|
|
40
|
+
|
|
41
|
+
## 最小示例
|
|
42
|
+
|
|
43
|
+
```ts
|
|
44
|
+
const engine = new WebGLEngine({
|
|
45
|
+
renderer: { clearColor: '#111111', viewport: document.body },
|
|
46
|
+
});
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
WebGPU 把第一行换成 `new WebGPUEngine({ ... })` 即可。
|
|
50
|
+
|
|
51
|
+
## 常用 API
|
|
52
|
+
|
|
53
|
+
- [`WebGLEngine`](vista3d://api/id/core:class:WebGLEngine) — WebGL 后端,构造即开循环
|
|
54
|
+
- [`WebGPUEngine`](vista3d://api/id/core:class:WebGPUEngine) — WebGPU 后端,共用 `EngineParams`
|
|
55
|
+
- [`Engine`](vista3d://api/id/core:class:Engine) — 抽象基类:`dispose`、`registerModule`、`resourceManager`、`maxFps`
|
|
56
|
+
- [`EngineObject`](vista3d://api/id/core:class:EngineObject) — 引擎持有对象的抽象基类
|
|
57
|
+
- [`EngineParams`](vista3d://api/id/core:interface:EngineParams) — 共用构造参数
|
|
58
|
+
- [`WebGLParams`](vista3d://api/id/core:interface:WebGLParams) — WebGL 的 `renderer` 选项
|
|
59
|
+
- [`WebGPUParams`](vista3d://api/id/core:interface:WebGPUParams) — WebGPU 的 `renderer` 选项
|
|
60
|
+
|
|
61
|
+
## 注意事项
|
|
62
|
+
|
|
63
|
+
- 默认 `maxFps` 是 `60`(`<= 0` 不限帧),默认清屏色 `#f0fff0`,默认 viewport 是 `document.body`
|
|
64
|
+
- 默认 `antialias` 为 `true`,`powerPreference` 为 `'high-performance'`
|
|
65
|
+
- 给了 `renderer.canvas` 就不要再依赖 `renderer.viewport`,后者会被忽略
|
|
66
|
+
- 传入离屏 Canvas 会抛错
|
|
67
|
+
- 同一 `Scene` 不能往引擎里加两次
|
|
68
|
+
- 同类型 `Module` 不能 `registerModule` 两次
|
|
69
|
+
- `dispose()` 会停循环、拆自建 canvas、释放场景和模块;外接 canvas 不会从 DOM 上移除
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
slug: entity
|
|
3
|
+
title: 实体
|
|
4
|
+
aliases:
|
|
5
|
+
- 实体
|
|
6
|
+
- entity
|
|
7
|
+
- 实体树
|
|
8
|
+
- entity tree
|
|
9
|
+
keywords:
|
|
10
|
+
- 创建实体
|
|
11
|
+
- create entity
|
|
12
|
+
- createChild
|
|
13
|
+
summary: 用 Entity 组成场景树。构造时挂上 Transform,组件用 addComponent,移除走 removeComponent。
|
|
14
|
+
tags:
|
|
15
|
+
- core
|
|
16
|
+
relatedExamples:
|
|
17
|
+
- entity
|
|
18
|
+
relatedApiIds:
|
|
19
|
+
- core:class:Entity
|
|
20
|
+
- core:interface:EntityParams
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
# 实体
|
|
24
|
+
|
|
25
|
+
## 适用场景
|
|
26
|
+
|
|
27
|
+
已经有场景,要建实体、挂组件、管父子层级时读这篇。
|
|
28
|
+
|
|
29
|
+
## 核心概念
|
|
30
|
+
|
|
31
|
+
`Entity` 是 ECS 容器,行为靠组件拼出来。构造时传入 `engine`,并自动挂上 `Transform`。可选组件用 `addComponent` 加上去。
|
|
32
|
+
|
|
33
|
+
父子用 `createChild` / `addChild` / `removeChild` 连成树。`activeSelf` 是自己的开关;`activeInHierarchy` 还取决于是否挂到场景、父级是否激活。
|
|
34
|
+
|
|
35
|
+
生命周期:构造(创建 Transform)→ 加组件 → `setActive` → `destroy`(递归拆掉)。静态查找 `findByGUID` / `findByName` / `findByComponent` / `findByCondition` 和 `traverse` 都是 BFS。
|
|
36
|
+
|
|
37
|
+
## 最小示例
|
|
38
|
+
|
|
39
|
+
```ts
|
|
40
|
+
const entity = scene.rootEntity.createChild();
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## 常用 API
|
|
44
|
+
|
|
45
|
+
- [`Entity`](vista3d://api/id/core:class:Entity) — 实体:`createChild`、`addComponent`、`setActive`、`destroy`
|
|
46
|
+
- [`EntityParams`](vista3d://api/id/core:interface:EntityParams) — `guid`、`name`、`userData`、`transform`
|
|
47
|
+
|
|
48
|
+
## 注意事项
|
|
49
|
+
|
|
50
|
+
- 构造参数全可选;不传 `guid` 会生成,`name` 默认空字符串
|
|
51
|
+
- 构造就会挂 `Transform`
|
|
52
|
+
- `createChild` / `addChild` 之后不必再 `setActive(true)`
|
|
53
|
+
- `setActive` 只改自身开关;层级是否激活还看场景挂接和父级
|
|
54
|
+
- `addComponent` 会做依赖检查;`removeComponent` 会 `destroy` 该组件
|
|
55
|
+
- `removeAllComponents` 会留下必需的 `Transform`
|
|
56
|
+
- `removeChild` / `removeAllChildren` 只脱开,不销毁
|
|
57
|
+
- `destroy()` 会拆本实体、组件和子树
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
slug: environment
|
|
3
|
+
title: IBL 环境
|
|
4
|
+
aliases:
|
|
5
|
+
- 环境
|
|
6
|
+
- environment
|
|
7
|
+
- IBL
|
|
8
|
+
- 环境贴图
|
|
9
|
+
keywords:
|
|
10
|
+
- 环境强度
|
|
11
|
+
- 环境旋转
|
|
12
|
+
- scene.environment
|
|
13
|
+
summary: 用 scene.environment 设置 IBL 贴图、强度和旋转。不要自己 new Environment。
|
|
14
|
+
tags:
|
|
15
|
+
- core
|
|
16
|
+
relatedExamples:
|
|
17
|
+
- environment
|
|
18
|
+
relatedApiIds:
|
|
19
|
+
- core:class:Environment
|
|
20
|
+
- core:interface:EnvironmentParams
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
# IBL 环境
|
|
24
|
+
|
|
25
|
+
## 适用场景
|
|
26
|
+
|
|
27
|
+
已经有场景,要配 IBL 环境时读这篇。
|
|
28
|
+
|
|
29
|
+
## 核心概念
|
|
30
|
+
|
|
31
|
+
`Environment` 管 IBL 贴图、强度和旋转。每个 `Scene` 上都有 `scene.environment`,直接用,不要自己 `new`。构造 `Scene` 时也可以传 `environment`。给 PBR 材质设 HDR 贴图会打开 IBL。
|
|
32
|
+
|
|
33
|
+
## 最小示例
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
scene.environment.map = { url: '/textures/studio.hdr' };
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## 常用 API
|
|
40
|
+
|
|
41
|
+
- [`Environment`](vista3d://api/id/core:class:Environment) — IBL 环境:`map`、`intensity`、`rotation`
|
|
42
|
+
- [`EnvironmentParams`](vista3d://api/id/core:interface:EnvironmentParams) — `map`、`intensity`、`rotation`
|
|
43
|
+
|
|
44
|
+
## 注意事项
|
|
45
|
+
|
|
46
|
+
- `map` 支持 `THREE.Texture` / `THREE.CubeTexture`,或 `{ url, decode?, mapping? }`;URL 字符串按 equirectangular 加载,字符串数组按 6 面 cube map 加载
|
|
47
|
+
- 用 URL 时是异步加载,赋值当下贴图还没到位,也没有完成回调
|
|
48
|
+
- `decode` 默认 `'HDR'`;`mapping` 默认 `THREE.EquirectangularReflectionMapping`,cube map 忽略 `mapping`
|
|
49
|
+
- `intensity` 默认 `1.0`;`rotation` 默认 `(0, 0, 0)`
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
slug: estimator
|
|
3
|
+
title: 裁剪面估算
|
|
4
|
+
aliases:
|
|
5
|
+
- 裁剪面估计器
|
|
6
|
+
- 裁剪面估算
|
|
7
|
+
- clip plane estimator
|
|
8
|
+
- near/far 估算
|
|
9
|
+
keywords:
|
|
10
|
+
- IClipPlaneEstimator
|
|
11
|
+
- ClipPlaneRange
|
|
12
|
+
- TopDownClipPlaneEstimator
|
|
13
|
+
- TiltedViewClipPlaneEstimator
|
|
14
|
+
- minElevation
|
|
15
|
+
- maxElevation
|
|
16
|
+
- queryMask
|
|
17
|
+
- estimate
|
|
18
|
+
summary: IClipPlaneEstimator 从相机位姿算 ClipPlaneRange;TopDown 俯视,TiltedView 倾斜透视。
|
|
19
|
+
tags:
|
|
20
|
+
- core
|
|
21
|
+
relatedExamples:
|
|
22
|
+
- top-down-clip-plane-estimator
|
|
23
|
+
- tilted-view-clip-plane-estimator
|
|
24
|
+
relatedApiIds:
|
|
25
|
+
- core:interface:IClipPlaneEstimator
|
|
26
|
+
- core:interface:ClipPlaneRange
|
|
27
|
+
- core:class:TopDownClipPlaneEstimator
|
|
28
|
+
- core:interface:TopDownClipPlaneEstimatorParams
|
|
29
|
+
- core:class:TiltedViewClipPlaneEstimator
|
|
30
|
+
- core:interface:TiltedViewClipPlaneEstimatorParams
|
|
31
|
+
- core:enum:QueryMask
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
# 裁剪面估算
|
|
35
|
+
|
|
36
|
+
## 适用场景
|
|
37
|
+
|
|
38
|
+
已经有 `camera` 和 elevation 范围(俯视或倾斜),要选、配置或自己实现 near/far 估计器时读这篇。
|
|
39
|
+
|
|
40
|
+
## 核心概念
|
|
41
|
+
|
|
42
|
+
`IClipPlaneEstimator.estimate(camera)` 返回 `ClipPlaneRange`;estimator 只负责计算,不写相机。写 `near` / `far` 由 `ClipPlaneUpdater` 或调用方自己做。
|
|
43
|
+
|
|
44
|
+
`TopDownClipPlaneEstimator` 假设相机垂直向下;`TiltedViewClipPlaneEstimator` 支持倾斜的 PerspectiveCamera,用 `scene.pick` 加几何 fallback 估。
|
|
45
|
+
|
|
46
|
+
## 最小示例
|
|
47
|
+
|
|
48
|
+
```ts
|
|
49
|
+
const range = estimator.estimate(camera);
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## 常用 API
|
|
53
|
+
|
|
54
|
+
- [`IClipPlaneEstimator`](vista3d://api/id/core:interface:IClipPlaneEstimator) / [`ClipPlaneRange`](vista3d://api/id/core:interface:ClipPlaneRange) — 估计器接口与结果:`minElevation`、`maxElevation`、`estimate`
|
|
55
|
+
- [`TopDownClipPlaneEstimator`](vista3d://api/id/core:class:TopDownClipPlaneEstimator) / [`TopDownClipPlaneEstimatorParams`](vista3d://api/id/core:interface:TopDownClipPlaneEstimatorParams) — 俯视估计器:elevation / near / far 约束
|
|
56
|
+
- [`TiltedViewClipPlaneEstimator`](vista3d://api/id/core:class:TiltedViewClipPlaneEstimator) / [`TiltedViewClipPlaneEstimatorParams`](vista3d://api/id/core:interface:TiltedViewClipPlaneEstimatorParams) — 倾斜透视估计器:继承 TopDown 参数,加 `queryMask`
|
|
57
|
+
- [`QueryMask`](vista3d://api/id/core:enum:QueryMask) — TiltedView 的 scene pick 掩码
|
|
58
|
+
|
|
59
|
+
## 注意事项
|
|
60
|
+
|
|
61
|
+
- `IClipPlaneEstimator` 的契约:`minElevation`、`maxElevation`、`estimate(camera): ClipPlaneRange`;自定义 estimator 实现这三个即可交给 `ClipPlaneUpdater`
|
|
62
|
+
- `TopDownClipPlaneEstimator` 构造默认:`minElevation` 0、`maxElevation` `EARTH_MAX_BUILDING_HEIGHT`(828)、`nearMin` 1、`nearFarMarginRatio` 0.5、`farMaxRatio` 6
|
|
63
|
+
- `TopDownClipPlaneEstimator` 约束:`minElevation <= maxElevation`;`nearMin` 必须 > 0;`nearFarMarginRatio` >= 0(0 关闭强制间距);`farMaxRatio` 必须 > 1;无效值在构造或 setter 抛错
|
|
64
|
+
- `minElevation` / `maxElevation` setter 会调整另一侧保持 invariant:`estimator.minElevation = -10;`、`estimator.maxElevation = 200;`
|
|
65
|
+
- `nearMin` / `nearFarMarginRatio` / `farMaxRatio` 可直接赋值:`estimator.nearMin = 0.5;`、`estimator.nearFarMarginRatio = 0.05;`、`estimator.farMaxRatio = 8;`
|
|
66
|
+
- `onUpdateElevationRange` 优先于静态 elevation:`estimator.onUpdateElevationRange = () => ({ minElevation, maxElevation });`
|
|
67
|
+
- `estimate(camera)` 返回 `ClipPlaneRange`:`near` / `far` 已含安全 margin;`minNear` 是 near 下界;`maxFar` 是 far 上限;estimator 自己不写相机
|
|
68
|
+
- 直接应用:`const range = estimator.estimate(camera); camera.near = range.near; camera.far = range.far; camera.updateProjectionMatrix();`
|
|
69
|
+
- 交给更新器:`cameraEntity.addComponent(ClipPlaneUpdater, { estimator });`;更新时机、eventPriority 等见 `clip-plane` guide
|
|
70
|
+
- `TopDownClipPlaneEstimator` 假设相机垂直向下;相机有倾斜时用 `TiltedViewClipPlaneEstimator`;估算基于相机所在 scene 的坐标
|
|
71
|
+
- `TiltedViewClipPlaneEstimator` 继承 TopDown 的全部 elevation / near / far 参数和默认值,额外多一个 `queryMask`
|
|
72
|
+
- `TiltedViewClipPlaneEstimator` 只支持 PerspectiveCamera;传 OrthographicCamera 时 `estimate` 抛错
|
|
73
|
+
- `TiltedViewClipPlaneEstimatorParams.queryMask` 默认 `QueryMask.EVERYTHING`,但对象的 `Renderer.queryMask` 默认 `QueryMask.NONE`;要让 scene pick 命中,对象的 renderer 必须设置与 queryMask 相交的掩码,否则会走几何 fallback
|
|
74
|
+
- `TiltedViewClipPlaneEstimator` 的 `queryMask` 可运行时改:`estimator.queryMask = QueryMask.MASK_0;`
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
slug: event
|
|
3
|
+
title: 事件派发
|
|
4
|
+
aliases:
|
|
5
|
+
- 事件
|
|
6
|
+
- event
|
|
7
|
+
- 事件派发
|
|
8
|
+
- 发布订阅
|
|
9
|
+
keywords:
|
|
10
|
+
- pub/sub
|
|
11
|
+
- publish subscribe
|
|
12
|
+
- on/off/emit
|
|
13
|
+
- 优先级
|
|
14
|
+
- 事件总线
|
|
15
|
+
summary: EventDispatcher 是发布订阅总线;Engine/EngineObject 已经继承它,订阅按优先级执行,回调返回 true 可中止本次派发。
|
|
16
|
+
tags:
|
|
17
|
+
- core
|
|
18
|
+
relatedExamples:
|
|
19
|
+
- event-dispatcher
|
|
20
|
+
relatedApiIds:
|
|
21
|
+
- core:class:EventDispatcher
|
|
22
|
+
- core:type:SubscriberCallbackFn
|
|
23
|
+
- core:enum:Priority
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
# 事件派发
|
|
27
|
+
|
|
28
|
+
## 适用场景
|
|
29
|
+
|
|
30
|
+
已经有 `engine` 和 `onLoaded` 回调,要订阅或派发事件时读这篇。
|
|
31
|
+
|
|
32
|
+
## 核心概念
|
|
33
|
+
|
|
34
|
+
`EventDispatcher` 是发布订阅总线。`Engine`、`EngineObject` 等引擎对象已经是 `EventDispatcher`,直接在这些对象上 `on` / `emit`;只有需要一条独立总线时才 `new EventDispatcher()`。
|
|
35
|
+
|
|
36
|
+
订阅者按优先级降序执行(`Priority.HIGH` 在 `Priority.LOW` 前);回调返回 `true` 会停止本次 `emit` 的后续订阅者。
|
|
37
|
+
|
|
38
|
+
回调里调用 `off` 不会打断本次 `emit` 的遍历;`once` 只触发一次,触发后自动退订。
|
|
39
|
+
|
|
40
|
+
## 最小示例
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
engine.on('loaded', onLoaded);
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## 常用 API
|
|
47
|
+
|
|
48
|
+
- [`EventDispatcher`](vista3d://api/id/core:class:EventDispatcher) — 发布订阅总线:`on`、`once`、`off`、`emit`、`dispose`
|
|
49
|
+
- [`SubscriberCallbackFn`](vista3d://api/id/core:type:SubscriberCallbackFn) — 订阅回调;返回 `true` 停止本次派发的后续订阅者
|
|
50
|
+
- [`Priority`](vista3d://api/id/core:enum:Priority) — 订阅优先级:`Priority.HIGH`、`Priority.NORMAL`、`Priority.LOW`
|
|
51
|
+
|
|
52
|
+
## 注意事项
|
|
53
|
+
|
|
54
|
+
- `Engine`、`EngineObject` 等已经是 `EventDispatcher`;给这些对象订阅事件时不用新建总线,直接 `on` / `emit`
|
|
55
|
+
- `on` / `once` 的 `options` 支持 `target`(回调的 `this`)和 `priority`(默认 `Priority.NORMAL`);订阅按优先级降序执行(`Priority.HIGH` 在 `Priority.NORMAL` 前,`Priority.NORMAL` 在 `Priority.LOW` 前)
|
|
56
|
+
- 回调返回 `true` 会停止本次 `emit` 的后续订阅者;返回 `false` 或 `void` 继续
|
|
57
|
+
- `off(type)` 清空该类型的全部订阅者;`off(type, callback)` 只移除第一个匹配的回调
|
|
58
|
+
- `once` 只触发一次,触发后自动退订;返回 `true` 仍能停止后续订阅者
|
|
59
|
+
- `emit` 的事件对象必须带 `type`,派发给该类型的订阅者
|
|
60
|
+
- `dispose()` 清空所有订阅者;不再使用时调用
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
slug: gltf
|
|
3
|
+
title: glTF 解析
|
|
4
|
+
aliases:
|
|
5
|
+
- glTF 解析
|
|
6
|
+
- 模型解析
|
|
7
|
+
- 实例化解析
|
|
8
|
+
- 预编译
|
|
9
|
+
keywords:
|
|
10
|
+
- parse
|
|
11
|
+
- parseAndPrecompile
|
|
12
|
+
- precompile
|
|
13
|
+
- extractMeshData
|
|
14
|
+
- hasSkeleton
|
|
15
|
+
- hasInstancedMesh
|
|
16
|
+
- useAutoInstancing
|
|
17
|
+
- autoInstancingExclude
|
|
18
|
+
- instanceTransformations
|
|
19
|
+
summary: GLTFParser 把 GLTFResource 解析成实体树,并支持预编译和实例化 Mesh 抽取。
|
|
20
|
+
tags:
|
|
21
|
+
- core
|
|
22
|
+
relatedExamples:
|
|
23
|
+
- gltf-parser
|
|
24
|
+
relatedApiIds:
|
|
25
|
+
- core:class:GLTFParser
|
|
26
|
+
- core:interface:GLTFParserParams
|
|
27
|
+
- core:interface:InstancedGLTFParserParams
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
# glTF 解析
|
|
31
|
+
|
|
32
|
+
## 适用场景
|
|
33
|
+
|
|
34
|
+
已经有 `engine`、`scene` 和 glTF 资源引用,要把模型解析成实体树、预编译 shader 或抽实例化 Mesh 数据时读这篇。
|
|
35
|
+
|
|
36
|
+
## 核心概念
|
|
37
|
+
|
|
38
|
+
`GLTFParser` 是静态解析器;`glTFRef` 从 `engine.resourceManager.loadGLTF(url)` 取。
|
|
39
|
+
|
|
40
|
+
`parse` 把 `GLTFResource.scene` 克隆成 `Entity` 树;`parseAndPrecompile` / `precompile` 先按相机预编译 shader;`extractMeshData` 抽实例化渲染用的 Mesh 数据。
|
|
41
|
+
|
|
42
|
+
## 最小示例
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
const root = GLTFParser.parse(glTFRef, { parent: scene.rootEntity });
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## 常用 API
|
|
49
|
+
|
|
50
|
+
- [`GLTFParser`](vista3d://api/id/core:class:GLTFParser) — glTF 解析:`parse`、`parseAndPrecompile`、`precompile`、`extractMeshData`、`hasSkeleton`、`hasInstancedMesh`
|
|
51
|
+
- [`GLTFParserParams`](vista3d://api/id/core:interface:GLTFParserParams) — 标准解析参数:`parent`、`queryMask`、`renderOrder`、`castShadow`、`receiveShadow`、`useBVH`、`useAutoInstancing`、`autoInstancingExclude`、`transformation`
|
|
52
|
+
- [`InstancedGLTFParserParams`](vista3d://api/id/core:interface:InstancedGLTFParserParams) — 实例化解析参数:`parent`、`queryMask`、`renderOrder`、`castShadow`、`receiveShadow`、`useBVH`、`transformation`、`instanceTransformations`
|
|
53
|
+
|
|
54
|
+
## 注意事项
|
|
55
|
+
|
|
56
|
+
- `GLTFParser` 只有 static 方法;直接 `GLTFParser.parse(...)`,不要 `new GLTFParser()`
|
|
57
|
+
- `parse`:`const root = GLTFParser.parse(glTFRef, { parent: scene.rootEntity });`;返回根 `Entity`
|
|
58
|
+
- `parse` 克隆 `glTFRef.resource.scene` 再建树,geometry / material 保持共享;已有 clone 时用第三个参数:`GLTFParser.parse(glTFRef, params, precompiledScene);`,`precompiledScene` 必须是 `glTFRef.resource.scene` 的 clone
|
|
59
|
+
- `parse` 不接管 `glTFRef`;按 `ResourceRef` 规则自己保留和释放
|
|
60
|
+
- `parse` 的树里有 `THREE.DirectionalLight` / `THREE.PointLight` / `THREE.SpotLight` 时抛错
|
|
61
|
+
- `GLTFParserParams.parent`:`parent: scene.rootEntity`;省略时返回独立 root,不挂到场景
|
|
62
|
+
- `GLTFParserParams.queryMask`:`queryMask: QueryMask.MASK_0`;默认 `QueryMask.NONE`
|
|
63
|
+
- `GLTFParserParams.renderOrder`:`renderOrder: RenderOrder.NORMAL`;默认 `RenderOrder.NORMAL`
|
|
64
|
+
- `GLTFParserParams.castShadow` / `receiveShadow`:`castShadow: true, receiveShadow: true`;默认都是 `false`
|
|
65
|
+
- `GLTFParserParams.useBVH`:`useBVH: false`;预留,当前不生效
|
|
66
|
+
- `GLTFParserParams.useAutoInstancing`:`useAutoInstancing: true`;默认 `false`;只在 parse 的 clone 上把重复 Mesh 合成 `THREE.InstancedMesh`,资源模板不变
|
|
67
|
+
- `GLTFParserParams.autoInstancingExclude`:`autoInstancingExclude: ['Blade']`;只在 `useAutoInstancing: true` 时生效,匹配 `mesh.name`
|
|
68
|
+
- `GLTFParserParams.transformation`:`transformation: { position, scale, rotation, quaternion, lookAt }`;默认 `{}`;`position` / `scale` 是 `THREE.Vector3`,`rotation` 是 `THREE.Euler`,`quaternion` 是 `THREE.Quaternion`,`lookAt` 是 `THREE.Vector3`
|
|
69
|
+
- `parseAndPrecompile`:`const root = await GLTFParser.parseAndPrecompile(glTFRef, params, targetScene, cameras);`;`targetScene` 是 three.js `THREE.Scene`,`cameras` 是 `THREE.Camera` 或数组;`cameras` 为空抛错;重复相机只编译一次;最终建树同 `parse`,灯光节点抛错;返回 `Entity`
|
|
70
|
+
- `precompile`:`const object3D = await GLTFParser.precompile(glTFRef, params, targetScene, cameras);`;返回 `THREE.Object3D`,不建 Entity;`parent` / `queryMask` / `renderOrder` / `transformation` 不在这里生效,attach 时用 `parse`;`castShadow` / `receiveShadow` / `useAutoInstancing` / `autoInstancingExclude` 影响返回的 clone;`cameras` 为空抛错;`glTFRef` 要留到 parse
|
|
71
|
+
- `extractMeshData`:`const meshData = GLTFParser.extractMeshData(glTFRef.resource.scene);`;返回 `{ name, guid, geometry, material, matrix }[]`,`matrix` 相对 scene 根;拒绝 `THREE.InstancedMesh`、`THREE.SkinnedMesh`、`THREE.DirectionalLight` / `THREE.PointLight` / `THREE.SpotLight`;不 retain 返回的 geometry / material
|
|
72
|
+
- `hasSkeleton`:`const hasSkeleton = GLTFParser.hasSkeleton(glTFRef.resource.scene);`;有 `THREE.Bone` 或 `THREE.SkinnedMesh` 返回 `true`
|
|
73
|
+
- `hasInstancedMesh`:`const hasInstancedMesh = GLTFParser.hasInstancedMesh(glTFRef.resource.scene);`;有 `THREE.InstancedMesh` 返回 `true`
|
|
74
|
+
- `InstancedGLTFParserParams`:`Scene.loadInstancedGLTF` 的参数;`parent` 省略时用 `scene.rootEntity`;`queryMask` 默认 `QueryMask.NONE`;`renderOrder` 默认 `RenderOrder.NORMAL`;`castShadow` / `receiveShadow` 默认 `false`;`useBVH` 预留;`transformation` 默认 `{}`;`instanceTransformations` 必填且非空,数组长度就是实例数,每项 `{ position, scale, quaternion }`
|
|
75
|
+
|
|
76
|
+
```ts
|
|
77
|
+
const instancedParams: InstancedGLTFParserParams = {
|
|
78
|
+
parent: scene.rootEntity,
|
|
79
|
+
queryMask: QueryMask.MASK_0,
|
|
80
|
+
renderOrder: RenderOrder.NORMAL,
|
|
81
|
+
castShadow: true,
|
|
82
|
+
receiveShadow: true,
|
|
83
|
+
useBVH: false,
|
|
84
|
+
transformation: { position: new THREE.Vector3(0, 0, 0) },
|
|
85
|
+
instanceTransformations: [
|
|
86
|
+
{
|
|
87
|
+
position: new THREE.Vector3(0, 0, 0),
|
|
88
|
+
scale: new THREE.Vector3(1, 1, 1),
|
|
89
|
+
quaternion: new THREE.Quaternion()
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
};
|
|
93
|
+
```
|