Repository navigation
0.4.0
Added
-
A model can now be shown from a camera its own author placed. Many
.gltfand.glb
files carry cameras — the section, the entrance, the angle whoever built the model
considered the right one — and until now the plugin ignored them.view: camera:<name>
in the block starts there: position, direction and field of view come straight out of the
file, and from that point you orbit, zoom and pan as usual, turning around the point that
camera looks at rather than the middle of the model, so a camera that frames a detail
keeps its detail. The name is looked up in the file, not in the loaded scene — worth
knowing, because the two are not the same: three.js rewrites names while loading and turns
Schnitt AintoSchnitt_A, so a name with a space would otherwise be unreachable. The
raw glTF is searched instead, node names first and camera names second, without regard to
case. A name that is not there, a file with no cameras at all, an orthographic camera (the
viewport is perspective) or aview: camera:…on an STL is reported below the viewport,
and the model is fitted as usual so that it stays visible. Save view is unchanged and
still writes numbers, so pressing it replaces the reference with the angle you are looking
from at that moment. -
Metallic models are no longer black. A metallic surface needs an environment to
reflect; without one there is nothing to see. glTF givesmetallicFactora default of
1.0, so a material that only sets a base colour — the most common case in hand-written
and tool-written files alike — was rendered as polished metal with nothing around it.
The viewport now provides that environment. -
New setting "Lighting" with three states: Faithful colors (the default; reflections
on, and your theme's colours stay intact), High contrast (punchier and more filmic,
shifts theme colours somewhat), and Off (the previous behaviour). The default changes
how existing notes look — that is deliberate, the old behaviour was the incorrect one. -
New setting "Model's own lights". Some 3D files bring their own lighting; the plugin
now steps back and stops adding its own when they do. Set it to Ignore them for files
whose lights are exported at unusable brightness. -
Models that come in several files now work. A
.gltfusually keeps its geometry in
a.binbeside it and its textures in a folder — the way every Blender export looks.
Those files are now loaded from your vault, resolved relative to the model file. What
the model asks for and your vault does not have is named below the viewport instead of
quietly missing. -
New setting "Allow external resources" (off by default). A model may point at
http(s) addresses; with the setting off, those are not fetched and are reported instead.
Off by default because opening a note should not contact a server you did not choose. -
STL files that carry their own colours now show them. The theme colour still applies
to STL files without colours of their own. -
Meshopt-compressed models now load (
EXT_meshopt_compression, whatgltfpack -cc
produces). The README said this was impossible because the decoder needs a web worker —
that is true of Draco, not of Meshopt: its decoder falls back to running in the main
thread, and the WebAssembly it needs is embedded in the plugin, so nothing is fetched.
Draco is still refused, and its message now names the way out instead of only the wall. -
A guide: writing a 3D model by hand. Builds a
model as text inside a note, step by step, and teaches you to read any.gltffile along
the way. Every example in it is loaded through the plugin's own loader on every commit,
so it cannot quietly stop working.
Fixed
- The "discard unsaved edits" dialog had its buttons the wrong way round — the
destructive choice sat on the left. Cancel is now on the left and the destructive
action on the right, as everywhere else in Obsidian.