Open code, practice, and notes →
Download source with English comments · for reading
19 · .ply·.splat loading
Week 3 / original Day 19 · Document and example provided · This is a learning sequence, not a fixed daily workload.
Full roadmap · Workspace usage
Goal
Check input data specifications and implement successful and failed loading.
Prerequisites
15~18, Promise and error handling.
Key concepts and explanations
A general PLY point cloud is not always GS data. Even files with the same .ply extension can have different fields and color representations, so compare them with the parameters the renderer expects. File size and GPU memory cost after parsing are not the same.
First record the source, license, format, version, and size, then choose one small dataset. The current project does not include GS data, and Spark is not being installed yet. Actual GS loading is planned as a separate local source exercise; do not arbitrarily relax the network-blocking settings of the current editor iframe.
Skills you will develop
- Check input data specifications and implement successful and failed loading.
- Reproduce the completion criteria below and answer the self-check questions in your own words.
Exercises
- Check supported formats and the Three.js peer dependency in the official documentation.
- Record the small file's URL, license, byte size, and format, and check whether it is excluded from Git.
- In a follow-up local exercise, load a valid file, a missing path, and an incompatible PLY, and distinguish their states and errors.
Variables to observe
Path, format, fields, size, scale. Start with just one dataset.
Completion criteria
- Recorded input specifications and redistribution conditions.
- Checked the difference between general PLY and GS PLY.
- Wrote or implemented expected results for success/failure.
Self-check questions
- Does HTTP 200 mean rendering succeeded too?
- Can compatibility be judged by the extension alone?
Official references
Experiment notes — fill these in yourself
Goal
Key concepts
Changed variables and predictions
Actual results
What I learned
Remaining questions
Previous: Projection·Sorting·Alpha Blending · Next: Three.js+GS camera and interaction
Linked example and execution scope
Runnable source code · Workspace unit ID: 19-gs-loading
An educational CPU Canvas viewer that reads small .splat and ASCII GS PLY files. The limits are 1 MiB·512 splats; binary PLY and general mesh PLY are not supported. Spark, GPU tile rendering, higher-order SH, and GS picking are outside the implementation scope. The default scene uses data created here, and measurements apply only to this CPU example.
Any previously saved code is preserved. To use the new original source, first back up everything as a full JSON file, then select Restore original code. Your notes are not erased.