Builtin Library
- ..
- .metadata205 B
- README.md1.2 KB
- dressing.module
- init.luau2.0 KB
README.md
instances.on_points (procNode)
Stand one source on every point: each point carries it as its Mesh ({ mesh = source }) and its material as its Material (the source's own, else the default material), placed by P, orient and scale (instances.place). io.output stands each point as an entity, and every point node works on them. instances.realize merges them into one geometry.
Inputs
source(Geometry or Mesh). What every point stands a copy of.points(Points). Where the copies stand: one per point, at that point's position.transform(Transform, optional). Per-instance offset, rotation and scale (instances.randomize_transformmakes one): the offset is added toP, the rotation lands inorientand the scale inscale. Unwired, every instance is unrotated, unscaled and exactly on its point.
Outputs
instances(Points). The points carryingMesh,Material,orientandscale.
local rocks = g.instances.on_points({ source = g.mesh.sphere({}), points = g.points.grid({ countX = 3, countZ = 3, spacing = 2 }), transform = g.instances.randomize_transform({ seed = 4, scaleMin = 0.5, scaleMax = 1 }) })